Browse Source

chore(api): improve error logging for failed webhook notification deliveries

pull/48/head
isra el 1 year ago
parent
commit
3122e34797
  1. 2
      api/src/webhook/webhook.service.ts

2
api/src/webhook/webhook.service.ts

@ -205,7 +205,7 @@ export class WebhookService {
webhookSubscription.lastDeliverySuccessAt = now webhookSubscription.lastDeliverySuccessAt = now
} catch (e) { } catch (e) {
console.error( 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.deliveryAttemptCount += 1
webhookNotification.lastDeliveryAttemptAt = now webhookNotification.lastDeliveryAttemptAt = now

Loading…
Cancel
Save