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
|
// production error handler
|
||||||
// no stacktraces leaked to user
|
// no stacktraces leaked to user
|
||||||
app.use(function(err, req, res, next) {
|
app.use(function(err, req, res, next) {
|
||||||
|
console.error(err);
|
||||||
res.status(err.status || 500);
|
res.status(err.status || 500);
|
||||||
res.render('error', {
|
res.render('error', {
|
||||||
message: err.message,
|
message: err.message,
|
||||||
|
Loading…
Reference in New Issue
Block a user