Skip to content

fix: never replay the webhook test call after a 5xx or a lost connection - #8

Merged
nathanfallet merged 1 commit into
mainfrom
fix/webhook-test-no-retry
Oct 24, 2026
Merged

nathanfallet merged 1 commit into
mainfrom
fix/webhook-test-no-retry

Conversation

@nathanfallet

Copy link
Copy Markdown
Member

Problem

POST /webhook-endpoints/{id}/test sends a real webhook.test event and the API accepts but ignores its Idempotency-Key (see the route description in the OpenAPI), so the client's automatic retry on 502, 503, 504 or a network error could send a second event.

Change

The call is retried on a 429 only (answered before the event leaves), plus on: the connection is refused or times out while connecting. Every other call keeps its current retries. A test covers each case.

Tests

Unit tests of the retry policy: no replay after 500, 502, 503, 504 or a lost connection; replay after a 429; other calls still retried on 503.

POST /webhook-endpoints/{id}/test sends a real webhook.test event and the API ignores its Idempotency-Key, so the automatic retry could send a second event. The call is now retried on a 429 only (answered before the event leaves), and on: the connection is refused or times out while connecting. Other calls keep their retries.
@nathanfallet
nathanfallet merged commit 801ee7f into main Oct 24, 2026
3 checks passed
@nathanfallet
nathanfallet deleted the fix/webhook-test-no-retry branch October 24, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant