log error before render

This commit is contained in:
Meutel 2014-06-25 16:24:16 +02:00
parent 47cd89f23c
commit b5fd989ed8

View File

@ -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,