Selaa lähdekoodia

hotfix index : log erreurs

Benoît Hubert 8 vuotta sitten
vanhempi
commit
918fa229e3
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      lib/indexHandlers.js

+ 5 - 1
lib/indexHandlers.js

@@ -100,7 +100,11 @@ module.exports = function(exStore, exDir, testMode) {
     .then(data => ({
       html: Mustache.render(indexTpml, data),
       code: statusCode ? statusCode : 200
-    }));
+    }))
+    .catch(err => {
+      console.error(err);
+      res.status(500).json({ error: err.message });
+    });
   }
 
   return {