Skip to content

Commit

Permalink
fix(Webhook): unknown error in catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbberry committed Nov 21, 2021
1 parent 924f089 commit 6b917c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"lint-staged": "^11.0.0",
"prettier": "^2.3.0",
"typedoc": "^0.21.0",
"typescript": "^4.2.4"
"typescript": "^4.4.4"
},
"dependencies": {
"node-fetch": "^2.6.1",
Expand Down
2 changes: 1 addition & 1 deletion src/structs/Webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class Webhook {
res.sendStatus(204);
}
} catch (err) {
this.options.error?.(err);
if (err instanceof Error) this.options.error?.(err);

res.sendStatus(500);
}
Expand Down

0 comments on commit 6b917c5

Please sign in to comment.