Webhook deliveries are failing
Use the delivery log to find out why your endpoint isn't receiving Duun events, fix timeouts and signature errors, and redeliver.
On this page
Duun sends events such as run.waiting and pr.merged to the webhook endpoints you set up in Settings → Webhooks. If your service stops receiving them, the delivery log tells you why.
Symptoms
- An endpoint shows Failing in Settings → Webhooks.
- Your service isn’t reacting to runs, asks or pull requests.
- Send test event reports a failure, such as a 502.
Check the delivery log
- Open Settings → Webhooks and find the endpoint.
- Click Open delivery log.
- Look at Recent requests: each shows the event, the status code your server returned, and how long it took.
- Open a failed request to see the payload and your server’s response.
The log keeps the last 7 days of deliveries.
Likely causes and fixes
Your server returned an error
Duun counts any 2xx status as delivered. Anything else, such as 404, 500 or 502, is a failure and is retried with backoff for up to 24 hours. Fix the error on your server, then redeliver (below).
A 404 often means the URL changed. Use Edit events… on the endpoint to check the URL and the events it’s subscribed to.
Your server took too long
Duun waits 10 seconds for a response. If your handler does slow work, such as calling other services, respond with 200 first and do the work afterwards in a background job.
Signature verification fails
If your server rejects deliveries with 400 or 401, it’s probably failing the X-Duun-Signature check. The usual mistakes:
- Parsing before verifying. The signature covers the raw request body. Many frameworks parse JSON first, which changes the bytes. Read the raw body for verification.
- Clock skew. Deliveries older than 5 minutes are meant to be rejected. If your server’s clock is off, valid deliveries look stale. Sync it with NTP.
- A rotated secret. After Rotate signing secret…, update the secret in your server. During a grace window the header carries two signatures; accept either.
- The wrong secret. Each endpoint has its own
whsec_…secret.
See Verifying signatures for working code in Node.js, Python and Go.
The endpoint is paused
A paused endpoint shows Paused · no events will be sent. Open its menu and choose Resume. Events from while it was paused aren’t sent.
Redeliver missed events
Once your server is fixed, open the delivery log and choose Redeliver on each failed request. You’ll see Redelivered with the new status. Events can arrive more than once or out of order, so make your handler skip event ids it has already processed.
Use Send test event any time to check the endpoint end to end.
Still stuck? Contact support with the endpoint URL, the delivery id (whd_…) and the time of a failed delivery.