Error body format
OpenAI protocol (/v1/chat/completions, etc.):
/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
typeofnew_api_erroror 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. Seeingoverloaded_error/rate_limit_errorgenerally 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.