Skip to content

isRetryableIdempotentOnly

isRetryableIdempotentOnly(value): boolean

Defined in: packages/core/src/errors.ts:140

Retry predicate for non-idempotent requests (POST/PUT/DELETE/PATCH).

Only RateLimitError (HTTP 429) is replayed, because a 429 means the server rejected the request before processing it, so a retry cannot duplicate a side-effect. Ambiguous failures — 5xx, network drops, and client-side timeouts — are deliberately NOT retried here: the write may already have taken effect server-side, and a blind replay would duplicate it (double order split, double cancel, re-pushed price/stock batch).

Callers that have made a write idempotent (e.g. by sending an idempotency key) should opt back into full retries via isRetryableError instead.

unknown

boolean

Unofficial. Lonca is an independent, community-maintained project — not affiliated with, endorsed by, or supported by Trendyol, Hepsiburada, or any other marketplace. All marketplace names and trademarks belong to their respective owners.