@@ -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 {