Skip to content
This repository has been archived by the owner on Nov 15, 2020. It is now read-only.

Commit

Permalink
fix: don't call wrap with custom status for Boom error
Browse files Browse the repository at this point in the history
  • Loading branch information
tungv committed Apr 14, 2017
1 parent 2ea66d1 commit 1917cce
Show file tree
Hide file tree
Showing 2 changed files with 842 additions and 622 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports.handleErrors = function (fn, dump = false) {
}

// Wrap the error and generate the response
const error = Boom.wrap(err, status)
const error = err.isBoom ? Boom.wrap(err) : Boom.wrap(err, status)
send(
res,
status,
Expand Down
Loading

0 comments on commit 1917cce

Please sign in to comment.