diff --git a/lib/telegraf.provider.ts b/lib/telegraf.provider.ts index 5b21284..58be5b1 100644 --- a/lib/telegraf.provider.ts +++ b/lib/telegraf.provider.ts @@ -21,8 +21,11 @@ export class TelegrafProvider extends Telegraf } async onApplicationBootstrap() { - this.catch((e) => { - this.logger.error(e); + this.catch((err, ctx: Context) => { + this.logger.error( + `Encountered an error for ${ctx.updateType} update type`, + err, + ); }); await this.launch(this.launchOptions); diff --git a/package-lock.json b/package-lock.json index 5029572..fc2dab0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nestjs-telegraf", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 092c30d..1ab75bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nestjs-telegraf", - "version": "1.2.0", + "version": "1.2.1", "description": "Telegraf module for NestJS", "keywords": [ "nest",