Error Response Format
Error messages returned to clients are sanitized. Raw provider details are never exposed. This prevents accidental leakage of prompt content through error responses.
Error Types
| HTTP Status | Error Type | Meaning |
|---|---|---|
400 | invalid_request_error | Bad request: invalid model, missing fields, validation failure, or payload exceeds limits |
401 | authentication_error | Authentication failed |
403 | permission_error | Invalid or missing API key, or access denied to the requested model |
429 | rate_limit_error | Rate limit or monthly quota exceeded |
500 | server_error | Internal server error |
502 | server_error | Upstream provider unavailable or returned a server error |
Retries
Consus Gateway automatically retries transient upstream errors once before returning an error to you. The retry delay depends on the error type:| Upstream Error | Delay | Reason |
|---|---|---|
429 (rate limit) | 2 seconds | Upstream provider needs time to reset |
502 / 503 (server error) | 0.5 seconds | Transient infrastructure blip |
429 and 502 with exponential backoff: start at 1 second, double each attempt, and cap at 5 retries.
Common Errors
Invalid model:destination_url, webhook_url, callback_url, forward_to, send_to, post_to, upload_url, ingest_url), the request is rejected at validation. The message identifies the tool and the offending parameter. See Chat Completions: Rejected Tool Schemas for the full list and rationale.
When
code is "upstream_rate_limit", the 429 came from the upstream model provider, not from your API key’s rate limit. API key rate limits are enforced at the API Gateway layer and return a 429 without a JSON body.