Orq.ai uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided. Codes in the 5xx range indicate an error with Orq or the LLM provider servers.
Attributes
id string
The id
of the transaction is useful for reporting metrics in the logs. If the transaction code
is 4xx
, any attempts to report metrics will result in an error.
code number
An error code is provided for specific errors that can be handled programmatically. The table below summarizes these codes.
error message
A human-readable message providing more details about the error.
source string
The source of the error that was generated. If the source is provider
, it means the error was thrown in the model provider layer; if it's system
, it indicates that the error was thrown in the Orq gateway layer.
HTTP Status code summary
Status | Summary | Meaning |
---|---|---|
200 | OK | Everything worked as expected |
400 | Bad Request | The request was unacceptable, often due to missing a required parameter |
401 | Unauthorized | No valid API key was provided |
402 | Request Failed | The parameters were valid, but the request failed |
403 | Forbidden | The API key doesn’t have permission to perform the request |
404 | Not Found | The requested resource doesn’t exist |
409 | Conflict | The request conflicts with another request |
429 | Too Many Requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests |
500, 502, 503, 504 | Server Errors | Something went wrong on the system or model provider end. |
Error example
{
"id": "efe8c8461327459eb1c26e532edb386a",
"code": 404,
"error": "Deployment with key 'example' was not found.",
"source": "system"
}