Show error no matter if production or development

progress
supositware 3 years ago
parent bd9e4cee36
commit 05b765c6f0

@ -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);

Loading…
Cancel
Save