Permalink
Browse files

Fix status for uncaught error log message.

  • Loading branch information...
1 parent 0f844ce commit 8d63b95dfbf537fe37c890a12c2c10d3d508b3c0 @mattflaschen mattflaschen committed Nov 25, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 settings.js
View
@@ -46,8 +46,9 @@ module.exports = function(app, configurations, express) {
return;
});
app.use(function(err, req, res, next) {
- console.error('Uncaught error. Returning 500: ', err);
- res.status(err.status || 500);
+ var status = err.status || 500;
+ console.error('Uncaught error. Returning ' + status + ': ', err);
+ res.status(status);
res.render('500', { error: err, layout: false });
});
});

0 comments on commit 8d63b95

Please sign in to comment.