Idempotency key invalid
Identifiers
Section titled “Identifiers”| Field | Value |
|---|---|
| Type URI | https://echo.labstack.com/pro/problems/idempotency-key-invalid |
| Code | idempotency_key_invalid |
| HTTP status | 400 |
| HTTP status | English title |
|---|---|
| 400 | Bad Request |
When it occurs
Section titled “When it occurs”The idempotency key header is invalid. It must be one field line of at most 300 bytes, containing one RFC 8941 string, such as "order-42", or one token. Execution rejects lists and repeated lines. Nothing was recorded, and the handler did not run.
Client handling
Section titled “Client handling”Send the key once as a quoted string or token. Keep that value when retrying the operation.
Example response
Section titled “Example response”If your application installs a custom handler, the body may differ.
HTTP/1.1 400 Bad RequestContent-Type: application/problem+jsonCache-Control: no-store
{ "code": "idempotency_key_invalid", "operation_ref": "", "operation_state": "", "safe_new_key": false, "status": 400, "title": "Bad Request", "type": "https://echo.labstack.com/pro/problems/idempotency-key-invalid"}Server correction
Section titled “Server correction”Check that clients and proxies preserve one Idempotency-Key field line. Reject duplicate lines, lists and unsupported syntax.
Response fields
Section titled “Response fields”Execution middleware
Section titled “Execution middleware”type(string, always): The exact type URI above.title(string, always): The HTTP status text.status(integer, always): The HTTP status of the response.code(string, always): The stable code above.operation_ref(string, always): An opaque reference to the operation. It is set only afterReplayCheckallows the request, and is empty when no operation was found. Use it to look up the operation; it does not grant access.operation_state(string, always):started,uncertain,completedorfailed; empty when no operation was found.safe_new_key(boolean, always):trueonly when the client may retry with a new key. It is alwaysfalsewhenoperation_refandoperation_stateare empty.
Headers:
Cache-Control(always):no-storeon every execution problem.
Notes:
- Execution removes any
Idempotent-Replayedheader from problem responses.
Related behavior
Section titled “Related behavior”See execution for operation state and replay rules.