Errors and retries

Problem details, auth failures, not founds, and rate-limit handling

View as Markdown

AskElephant’s public API uses application/problem+json for error responses.

Error shape

1{
2 "type": "https://app.askelephant.ai/errors/validation_failed",
3 "title": "Validation Failed",
4 "status": 422,
5 "detail": "The request contains invalid fields.",
6 "request_id": "rid_01ABC...",
7 "errors": [
8 {
9 "field": "limit",
10 "code": "invalid_range",
11 "message": "limit must be between 1 and 100."
12 }
13 ]
14}

Core fields

FieldMeaning
typeStable error category URL
titleShort human-readable summary
statusHTTP status code
detailMore specific explanation
request_idCorrelation ID for support and debugging
errorsOptional field-level validation details

Common statuses in the live API

StatusMeaning
400Invalid request shape or query parameters
401Missing or invalid authentication
403Authenticated but missing the required scope
404Resource not found
429Rate limited
500Unexpected server error

Retry guidance

  • Retry 429 only after respecting Retry-After.
  • Do not retry 401 until you refresh or replace the credential.
  • Do not retry 403 until the credential has the required scope.
  • Do not retry 404 unless the resource may legitimately appear later.

Support tip

Include request_id when reporting issues to AskElephant so requests can be traced quickly.