fix(provider): time out and retry Mollie 429 and 409 responses #164
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-payment!164
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/mollie-retry"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
What
Every Mollie call now has a 10 s timeout. A 429 is retried with backoff. A 409 (same idempotency key still in flight) is retried on keyed writes.
Why
The SDK retries only 5xx. A 429 during
startCheckoutfailed the customer's checkout. One 429 aborted a reconciliation pass. A stalled connection held a webhook handler, and Mollie cuts webhook calls off after 15 s.How
src/provider/mollie-retry.tswraps the SDK client once, in theMollieProviderconstructor. No call site changes.get,list,page) retry on 429.idempotencyKey, and every attempt sends the same key. They retry on 429 and 409.listPaymentsandlistChargebackspage withpage()andnextPage()instead ofiterate(). The iterator cannot resume after a failed fetch. Each next-page fetch is retried.Limits
Retry-Afterheader or an abort signal. Backoff is fixed, and a timed-out request is abandoned, not cancelled.Tested
src/provider/mollie-retry.test.ts: 429 then success, attempt cap, same key on every write attempt, no retry for unkeyed writes, 409 only on keyed writes, other errors not retried, timeout,thisbinding.src/provider/mollie.test.ts: listings now usepage, plus a multi-page case.pnpm test,pnpm lint,pnpm typecheckpass.Closes #148
Closes #86