Show error no matter if production or development
This commit is contained in:
parent
bd9e4cee36
commit
05b765c6f0
1 changed files with 2 additions and 2 deletions
4
app.js
4
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);
|
||||
|
|
Loading…
Reference in a new issue