Skip to main content

Errors

All error responses follow a consistent format.

Error format

{
"error": "Description of what went wrong"
}

HTTP status codes

StatusMeaningCommon causes
400Bad RequestMalformed JSON, missing required fields
401UnauthorizedMissing API key, invalid API key, expired API key
500Internal Server ErrorEvaluation engine failure, database error

Common errors

Missing API key

HTTP 401
{ "error": "Authentication required" }

Ensure you're passing the Authorization header with a valid API key.

Invalid API key

HTTP 401
{ "error": "Invalid API key" }

The API key doesn't exist or has been revoked. Check the key in the Console.

Expired API key

HTTP 401
{ "error": "Invalid API key" }

The API key has passed its expiration date. Create a new key in the Console.

Invalid request body

HTTP 400
{ "error": "Key: 'EvaluationRequest.Subject.ID' Error:Field validation for 'ID' failed on the 'required' tag" }

Check that your request body includes all required fields.

Best practices

  • Handle 401 errors by checking your API key configuration.
  • Handle 400 errors by validating your request before sending.
  • On 500 errors, implement retry with exponential backoff.
  • Default to deny if the AuthzX API is unreachable — fail closed, not open.