From 3122e347978957911963afd7c472ae1497d0b0f3 Mon Sep 17 00:00:00 2001 From: isra el Date: Sun, 22 Dec 2024 17:04:42 +0300 Subject: [PATCH] chore(api): improve error logging for failed webhook notification deliveries --- api/src/webhook/webhook.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/webhook/webhook.service.ts b/api/src/webhook/webhook.service.ts index 52468d9..4de5c55 100644 --- a/api/src/webhook/webhook.service.ts +++ b/api/src/webhook/webhook.service.ts @@ -205,7 +205,7 @@ export class WebhookService { webhookSubscription.lastDeliverySuccessAt = now } catch (e) { console.error( - `Failed to deliver webhook notification ${webhookNotification._id}: received response status code ${e.response.status}`, + `Failed to deliver webhook notification ${webhookNotification._id}: received response status code ${e.response?.status} with message ${e.message}`, ) webhookNotification.deliveryAttemptCount += 1 webhookNotification.lastDeliveryAttemptAt = now