Skip to content

Commit

Permalink
fix(Webhook): unknown error in catch block (#73)
Browse files Browse the repository at this point in the history
* fix(Webhook): unknown error in catch block

* bump
  • Loading branch information
jpbberry authored Dec 3, 2021
1 parent 924f089 commit a2d9685
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@top-gg/sdk",
"version": "3.1.2",
"version": "3.1.3",
"description": "Official Top.gg Node SDK",
"main": "./dist/index.js",
"scripts": {
Expand Down 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 a2d9685

Please sign in to comment.