Skip to main content
When something goes wrong, the Arbitrage API always returns a structured error response with a machine-readable status code and a human-readable message. This consistent format means you can handle errors programmatically using the status field while surfacing useful context to your users or logs via the message field. Internal server details are never exposed — only safe, descriptive messages reach your client.

Error response format

Every error from the Arbitrage API follows this envelope:
  • Use status for programmatic branching in your code — it never changes for a given error condition.
  • Use message for logging and user-facing display — it may include dynamic context like a countdown or a field name.

Error codes

The table below covers every status code defined in the API. HTTP status codes are listed alongside each to help you triage at the transport layer before parsing the body.

Example error responses

Handling errors in Python

The pattern below covers the most common error categories you’ll encounter in production:
python
The message field is always safe to log and display to end users. It never contains internal stack traces, database details, or secrets.
For automated retries, treat INTERNAL_ERROR, SERVICE_UNAVAILABLE, EMBEDDING_FAILED, and PLATFORM_UNAVAILABLE as transient — they typically resolve within seconds. Treat UNAUTHORIZED, FORBIDDEN, INVALID_API_KEY, and QUOTA_EXCEEDED as permanent until you take corrective action.