Skip to content

Idempotency key reused

FieldValue
Type URIhttps://echo.labstack.com/pro/problems/idempotency-key-reused
Codeidempotency_key_reused
HTTP status422
HTTP statusEnglish title
422Unprocessable Entity

The key already belongs to another request. This request’s fingerprint differs from the first recorded request.

Do not change a request while you retry it under the same key. To get the original operation’s answer, resend the original request with that key. Use a new key only for a new, different operation.

If your application installs a custom handler, the body may differ.

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/problem+json
Cache-Control: no-store
{
"code": "idempotency_key_reused",
"operation_ref": "",
"operation_state": "",
"safe_new_key": false,
"status": 422,
"title": "Unprocessable Entity",
"type": "https://echo.labstack.com/pro/problems/idempotency-key-reused"
}

Check which request fields FingerprintSpec includes. Keep fields that change business behavior in the fingerprint.

  • 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 after ReplayCheck allows 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, completed or failed; empty when no operation was found.
  • safe_new_key (boolean, always): true only when the client may retry with a new key. It is always false when operation_ref and operation_state are empty.

Headers:

  • Cache-Control (always): no-store on every execution problem.

Notes:

  • Execution removes any Idempotent-Replayed header from problem responses.

See execution for operation state and replay rules.