Skip to content

Commit

Permalink
fix: replace deprecated Boom.wrap call (#24)
Browse files Browse the repository at this point in the history
* fix: replace wrong boom wrap call

* fix: replace non-existant logger.log call

* chore: bump package to 1.1.5
  • Loading branch information
LonelyPrincess authored Jan 23, 2025
1 parent ae7322d commit 285a1df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions lib/default-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ module.exports = function(options) {
}

function errorMiddleware(err, req, res, next) {
err = Boom.wrap(err)
err = Boom.boomify(err)
// https://github.com/hapijs/boom/issues/39
if (config.showErrorDetail) {
err.output.payload.message = err.message
err.output.payload.stack = err.stack
}
has(res, 'locals.logger') ? res.locals.logger.log(err) : logger.log(err)
has(res, 'locals.logger') ? res.locals.logger.error(err) : logger.error(err)
dispatch(err, req, res)
}

Expand All @@ -54,5 +54,3 @@ module.exports = function(options) {
start: async.seq(init, validate, start)
}
}


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "systemic-express",
"version": "1.1.4",
"version": "1.1.5",
"description": "A systemic express component",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 285a1df

Please sign in to comment.