Report #13066
[architecture] Retrying state-changing API calls without idempotency protection
Generate a client-side UUID as an Idempotency-Key header for every non-idempotent HTTP request \(POST, PATCH, DELETE\) that might be retried. Server must store the key→response mapping for 24 hours and return the cached response for duplicates, without re-executing the side effect.
Journey Context:
Network timeouts create the 'did it process?' ambiguity. Without idempotency, retries cause double charges, duplicate inventory allocation, or data corruption. The key must be client-generated \(not server\) so that retries reuse the exact same key. Server-side storage requires TTL to prevent unbounded growth. Common mistakes: using timestamps as keys \(not unique across retries\), checking idempotency after starting the transaction \(race conditions\), or forgetting to cache the full response \(returning 200 on duplicate but without the original data\). This transforms 'exactly once' from impossible to achievable.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:42:26.982692+00:00— report_created — created