From 12cf1b6718013c36e56afa40c0abde48dd1ec090 Mon Sep 17 00:00:00 2001 From: ericboucher Date: Tue, 24 Sep 2024 15:47:43 +0200 Subject: [PATCH] Update webhook.service.ts --- apps/backend/src/modules/webhook/webhook.service.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/backend/src/modules/webhook/webhook.service.ts b/apps/backend/src/modules/webhook/webhook.service.ts index 5832dba8..11b3bcef 100644 --- a/apps/backend/src/modules/webhook/webhook.service.ts +++ b/apps/backend/src/modules/webhook/webhook.service.ts @@ -35,8 +35,6 @@ export class WebhookService { throw new Error('telegramNcdmChatId is not defined'); } - console.log(JSON.stringify(form)); - const text = generateTelegramMessage(disasterType, form); await Promise.all([ @@ -46,7 +44,8 @@ export class WebhookService { return 'sent'; } catch (error) { - console.error('Error sending alerts:', error); + console.log(JSON.stringify(form)); + console.error('Error sending alerts:', JSON.stringify(error)); throw new HttpException('Failed to send alerts', HttpStatus.INTERNAL_SERVER_ERROR); } }