Copilot follows conventional HTTP response codes to indicate the success or failure of an API request and uses the following codes:
Error Code | Meaning |
---|---|
200 | OK — Everything worked as expected. |
400 | Bad Request — The request was unacceptable, typically due to an invalid or missing parameter. |
401 | Unauthorized — No valid API key provided. |
404 | Not Found — The requested resource doesn't exist. |
429 | Too Many Requests — Too many requests hit the API too quickly. |
500 | Internal Server Error — There was an error with Copilot's servers. Try again later or contact Copilot support. |
Error Response
Some errors that could be handled programmatically (e.g., a parameter is invalid) include an error response object that explains the error reported.
code string
Specialized identifier for this type of error in our API. Mostly returned with 4xx
errors and briefly explains the error reported.
message string
Human readable error message describing the issue.
data string or object
Additional information provided about an error for 5xx
response status.