Connection webhooks error handling
There are two kinds of errors to handle:- API errors: what the Connections API returns when you call it to register or manage webhooks.
- Delivery errors: what you return to Zapier when it POSTs an event to your
callback_url, and how Zapier retries.
API errors
Every error from the endpoints that register and manage webhooks (list, create, retrieve, update, delete) is returned as a JSON body with anerrors array. Each error object has this shape:
For example, a validation error identifies the offending field with
source:
errors[0].code to branch programmatically, and errors[0].detail for the explanation.
HTTP status codes
Delivery errors
When Zapier POSTs an event to yourcallback_url, the status you return controls whether Zapier retries.
- Success (
2xx): the delivery is acknowledged and not retried. - Retryable failure (
429or5xx): the delivery is retried later. A timeout or connection error is also retried. - Permanent failure (any other
4xx): the delivery is not retried. Return one only when the delivery is genuinely unprocessable, such as a signature that does not verify.
Retries and Retry-After
Retryable failures are retried a few times with increasing backoff, over roughly 25 minutes. If every attempt fails, the event is dropped and not delivered again. If your endpoint returns a429 or 5xx with a Retry-After header, Zapier honors it as the delay before the next attempt, in place of the default backoff. Only the integer-seconds form is honored (for example, Retry-After: 120); the HTTP-date form is ignored, and Zapier falls back to its default backoff. The delay is capped at 600 seconds (10 minutes).
Because a delivery can be retried, the same event can arrive more than once. Deduplicate on the webhook-id header and make your handler idempotent.