Skip to content

Commit

Permalink
upgraded error handler + bump all deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ildella committed Jan 4, 2024
1 parent 526dbd0 commit 5608f50
Show file tree
Hide file tree
Showing 3 changed files with 155 additions and 82 deletions.
6 changes: 5 additions & 1 deletion http/http-error-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const errorHandler = ({printStack = false, verboseDump = false} = {}) => (error,
},
reply) => {
const code = error.status || error.statusCode || 500
const response = {message: error.message, code}
const response = {
description: error.description,
message: error.message,
code,
}
const message = printStack === true ? error : response
const basic = {
method, hostname, url, body,
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moar-js",
"version": "1.13.0",
"version": "1.14.0",
"description": "Simple JavaScript files I use across projects",
"author": {
"name": "Daniele Dellafiore"
Expand Down Expand Up @@ -39,25 +39,25 @@
"test.watch": "yarn test --watch"
},
"devDependencies": {
"axios": "1.6.2",
"eslint": "8.55.0",
"eslint-config-node-moar": "0.11.0",
"eslint-config-node-moar-stricter": "0.1.0",
"eslint-config-node-moar-test": "0.1.3",
"axios": "1.6.4",
"eslint": "8.56.0",
"eslint-config-node-moar": "0.12.1",
"eslint-config-node-moar-stricter": "0.2.1",
"eslint-config-node-moar-test": "0.2.0",
"eslint-plugin-fp": "2.3.0",
"eslint-plugin-jest": "27.6.0",
"eslint-plugin-jest": "27.6.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-security": "1.7.1",
"eslint-plugin-sonarjs": "0.23.0",
"eslint-plugin-unicorn": "49.0.0",
"eslint-plugin-unicorn": "50.0.1",
"exstream.js": "0.23.0",
"fastify": "4.24.3",
"fastify": "4.25.2",
"jest": "29.7.0",
"node-notifier": "10.0.1",
"nostr-tools": "1.17.0",
"tracer": "1.3.0",
"ws": "8.14.2"
"ws": "8.16.0"
},
"dependencies": {
"just-curry-it": "5.3.0",
Expand Down
Loading

0 comments on commit 5608f50

Please sign in to comment.