Permalink
Browse files

fix errorHandler signature

introduced by Vitaly in 82bf325
  • Loading branch information...
1 parent c874341 commit 8262bd39ccf73cf157a937321efbc91c6a1d339c @tj tj committed Nov 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/middleware/errorHandler.js
@@ -42,7 +42,7 @@ var env = process.env.NODE_ENV || 'development';
*/
exports = module.exports = function errorHandler(){
- return function errorHandler(err, req, res){
+ return function errorHandler(err, req, res, next){
if (err.status) res.statusCode = err.status;
if (res.statusCode < 400) res.statusCode = 500;
if ('test' != env) console.error(err.stack);

2 comments on commit 8262bd3

Contributor

dougwilson replied Nov 13, 2012

Thanks 😄 I literally just ran into this issue with Express 3.0.3 / connect 2.7.0.

Thanks, this one threw me for a little while

Please sign in to comment.