π¬ Want to contribute? Join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0
Problem
backend/src/services/webhookService.ts sends webhooks with a single attempt (line 189: attempt_count, 1). If a delivery fails (timeout, 5xx response, network error), it is recorded in webhook_deliveries but never retried.
This means webhook subscribers can silently miss events with no way to recover other than re-polling.
Expected Behavior
Failed webhook deliveries should be retried with exponential backoff (e.g., 1m, 5m, 30m) up to a configurable max retry count.
Implementation Suggestion
- Add a
max_attempts column to webhook_subscriptions (default 5)
- Add a scheduled job that queries
webhook_deliveries for failed deliveries where attempt_count < max_attempts and delivered_at IS NULL
- Retry with exponential backoff
- Mark as permanently failed after max attempts
Files to Change
backend/src/services/webhookService.ts β add retry logic
backend/migrations/ β add migration for max_attempts column
- New:
backend/src/services/webhookRetryScheduler.ts
Acceptance Criteria
Problem
backend/src/services/webhookService.tssends webhooks with a single attempt (line 189:attempt_count, 1). If a delivery fails (timeout, 5xx response, network error), it is recorded inwebhook_deliveriesbut never retried.This means webhook subscribers can silently miss events with no way to recover other than re-polling.
Expected Behavior
Failed webhook deliveries should be retried with exponential backoff (e.g., 1m, 5m, 30m) up to a configurable max retry count.
Implementation Suggestion
max_attemptscolumn towebhook_subscriptions(default 5)webhook_deliveriesfor failed deliveries whereattempt_count < max_attemptsanddelivered_at IS NULLFiles to Change
backend/src/services/webhookService.tsβ add retry logicbackend/migrations/β add migration formax_attemptscolumnbackend/src/services/webhookRetryScheduler.tsAcceptance Criteria
webhook_deliveries.attempt_countis incremented on each retry