Skip to content

Commit

Permalink
chore: dont throw in errorHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Oct 1, 2024
1 parent 1040c6d commit bbe5145
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ export class Bot<
};

private errorHandler(context: Context<any>, error: Error) {
if (!this.hooks.onError.length) throw error;
if (!this.hooks.onError.length)
return console.error("[Default Error Handler]", context, error);

return this.runImmutableHooks("onError", {
context,
Expand Down

0 comments on commit bbe5145

Please sign in to comment.