Skip to content

Error Handling

All Aura API errors return a consistent JSON body:

{
"error": "Human-readable message",
"error_code": "machine_readable_code",
"detail": "Additional context or validation details"
}
CodeNameMeaning
200OKRequest succeeded
201CreatedResource created successfully
400Bad RequestInvalid parameters or request body
401UnauthorizedMissing, invalid, or expired API key
403ForbiddenNo Authorization header present (wrong auth scheme)
404Not FoundResource does not exist
422Unprocessable EntityRequest schema validation failed — check field types and required fields
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer-side failure
{
"error": "Not authenticated",
"error_code": null,
"detail": "Not authenticated"
}

Cause: Missing or invalid X-API-KEY header. Fix: Ensure every request includes X-API-KEY: your_key.


{
"error": "Validation error",
"detail": [
{
"loc": ["body", "name"],
"msg": "field required",
"type": "value_error.missing"
}
]
}

Cause: A required field is missing or has the wrong type. Fix: Check the API Reference for the required request schema for that endpoint.


{
"error": "Not found",
"error_code": null,
"detail": "Not found"
}

Cause: The resource ID doesn’t exist or doesn’t belong to your account. Fix: Verify the ID using the corresponding list endpoint first.


Back off and retry after the delay indicated in the Retry-After response header. Use exponential backoff for automated clients:

import time
def request_with_retry(fn, max_retries=3):
for attempt in range(max_retries):
resp = fn()
if resp.status_code == 429:
wait = 2 ** attempt
time.sleep(wait)
continue
return resp
raise Exception("Max retries exceeded")