Skip to content

Error responses

The Issuer API and the Verifier API return each error in the same JSON body. Each operation page in the API reference lists its status codes and error codes.

400 response
{
"error": "Validation failed",
"code": "VALIDATION_FAILED",
"field_errors": [
{
"path": "encryption_metadata.iv",
"message": "IV must be exactly 16 base64url characters (96 bits)"
}
]
}
Field Always in the body Content
code Yes The error code, for example VALIDATION_FAILED. This value is stable.
reason No A more specific cause for some codes. For example, a FORBIDDEN response can have the reason issuer_mismatch. This value is stable.
error Yes A short summary for people. This text can change.
detail No More information for people. This text can change.
field_errors No A list of problems in the request fields. Each item has path and message.

In field_errors, path is the dot-delimited name of the request field, for example encryption_metadata.iv. For a request header, path is the header name, for example Idempotency-Key. The path is an empty string if the problem is not in one field. The message is text for people and can change.

  • Use code and reason in conditional statements.
  • Do not compare error, detail or message.
  • If your code does not know a reason value, use code.
  • Use the path of each item in field_errors to find the request field.

The issuer SDK puts the code on its API error. Refer to Handle errors.

An error from a verification operation is in one of three groups.

Group Status and code Result
Not verified 422 NOT_VERIFIED The request is correct, but the payload could not be verified.
Temporary 429 RATE_LIMITED, 500 INTERNAL_ERROR, 503 SERVICE_UNAVAILABLE Send the same request again later. Use exponential backoff.
Integration fault 400 VALIDATION_FAILED, 401 UNAUTHORIZED, 403 FORBIDDEN, 404 NOT_FOUND, 409 IDEMPOTENCY_KEY_REUSED, 413 PAYLOAD_TOO_LARGE, 415 UNSUPPORTED_MEDIA_TYPE Correct the request, the token or the client configuration. The same request gives the same error.

A NOT_VERIFIED response has no field_errors. A 400 VALIDATION_FAILED response is for a request body or an Idempotency-Key header that is not in the correct format. It contains field_errors. A 409 IDEMPOTENCY_KEY_REUSED response is for an idempotency key that you cannot use again. Send a new key.

The verify operation sends NOT_VERIFIED without a reason. The sandbox test operation adds a reason that gives the cause.

The network in front of the API can also send a response. For example, a 429 response can have no JSON body. If the body does not have code, use the HTTP status.