api idempotency ai_generated true

Duplicate resource created — idempotency key not forwarded through proxy

ID: api/idempotency-key-not-propagated

Also available as: JSON · Markdown
85%Fix Rate
88%Confidence
4Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
any active

Root Cause

Reverse proxy strips Idempotency-Key header, causing retries to create duplicates.

generic

Workarounds

  1. 93% success Ensure proxy passes Idempotency-Key header through
    nginx: proxy_pass_header Idempotency-Key;

    Sources: https://stripe.com/docs/api/idempotent_requests

  2. 88% success Generate UUID-based idempotency key at the outermost client layer
    headers['Idempotency-Key'] = str(uuid.uuid4())

    Sources: https://brandur.org/idempotency-keys

Dead Ends

Common approaches that don't work:

  1. Rely on client-side deduplication only 80% fail

    Client cannot prevent server-side duplicates if the server never sees the idempotency key

  2. Use request body hash as idempotency key 70% fail

    Body hash changes if any field differs slightly