Skip to main content
When a request fails, FortAPI tells you why with an HTTP status code plus a JSON error body. The body’s shape depends on the protocol you’re using.

Error body format

OpenAI protocol (/v1/chat/completions, etc.):
Claude protocol (/v1/messages):
The message usually ends with a request id. Include it when contacting support — it’s the fastest way to locate that request’s logs.

Status codes

Telling which layer an error came from

  • Errors from FortAPI itself usually have type of new_api_error or a standard type (insufficient_quota, invalid_request_error, …).
  • Errors from the upstream provider (e.g. rate_limit_error, overloaded_error) are passed through verbatim, preserving the upstream status code and type, with per-channel retry where applicable. Seeing overloaded_error / rate_limit_error generally points to an upstream-side issue.

Retry guidance

For transient errors (429 / 500 / 503 / 529), retry with exponential backoff (e.g. 1s, 2s, 4s… with a little jitter) rather than hammering — tight retries make rate limiting worse. 401 / 403 / 404 are configuration errors; retrying won’t help — fix the config per the table above.