When it fires
TheIdempotency-Key header value is longer than 255 characters.
Why it happens
- Several identifiers were concatenated into the key (user id, market id, timestamp, nonce) and the result exceeded 255 characters.
- A library generated an unusually long token (for example a JWT instead of a UUID).
How to fix
- Use a UUID v4 (
uuidgen,crypto.randomUUID()) or a ULID. Both are 26 to 36 characters, well under the limit. - If you need to encode meaning in the key, hash it, for example
sha256(your-blob).slice(0, 32), instead of concatenating raw values. - Allowed characters are
[A-Za-z0-9_\-:.]; seeIDEMPOTENCY_KEY_FORMAT_INVALID.
Related codes
IDEMPOTENCY_KEY_FORMAT_INVALID— disallowed charactersIDEMPOTENCY_KEY_CONFLICT— same key, different body