From 05b765c6f01a5de13f04bda07caa87f20c3564f2 Mon Sep 17 00:00:00 2001 From: supositware Date: Sun, 13 Jun 2021 16:12:43 +0200 Subject: [PATCH] Show error no matter if production or development --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 8c13c2a..da03818 100644 --- a/app.js +++ b/app.js @@ -27,9 +27,9 @@ app.use(function(req, res, next) { // error handler app.use(function(err, req, res, next) { - // set locals, only providing error in development + // set locals res.locals.message = err.message; - res.locals.error = req.app.get('env') === 'development' ? err : {}; + res.locals.error = err; // render the error page res.status(err.status || 500);