log error before render
This commit is contained in:
parent
47cd89f23c
commit
b5fd989ed8
@ -73,6 +73,7 @@ if (app.get('env') === 'development') {
|
||||
// production error handler
|
||||
// no stacktraces leaked to user
|
||||
app.use(function(err, req, res, next) {
|
||||
console.error(err);
|
||||
res.status(err.status || 500);
|
||||
res.render('error', {
|
||||
message: err.message,
|
||||
|
Loading…
Reference in New Issue
Block a user