Skip to content

Commit

Permalink
Merge 35d15f6 into ac20367
Browse files Browse the repository at this point in the history
  • Loading branch information
piranna committed Dec 8, 2015
2 parents ac20367 + 35d15f6 commit 25ec097
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ function finalhandler(req, res, options) {
status = err.status
}

// allow to pass just the status code
if (typeof err === 'number') {
status = err
}

// default status code to 500
if (!status || status < 400) {
status = 500
Expand Down

0 comments on commit 25ec097

Please sign in to comment.