Errors
Learn about how our API handles and returns errors
API Response Codes
Our API uses conventional HTTP response codes to indicate the success or failure of API requests. In general:
Codes in the
2xx
range indicate successCodes in the
4xx
range indicate errors that failed given the information providedCodes in the
5xx
range indicate errors with our servers
Error Response Format
All error responses follow a consistent format:
{
"error": {
"code": "error_code_string",
"message": "A human-readable message describing the error"
}
}
Attributes
code - A string identifier that indicates the specific type of error that occurred
message - A human-readable message providing more details about the error
internal_server_error
Indicates an unexpected error occurred on our servers
not_found
The requested resource could not be found
parameter_missing
A required parameter was not provided
invalid_token
The provided authentication token is invalid
missing_token
No authentication token was provided
Examples
Authentication Error (HTTP 401)
Status: 401 Unauthorized
{
"error": {
"code": "invalid_token",
"message": "The provided authentication token is invalid"
}
}
Resource Not Found (HTTP 404)
Status: 404 Not Found
{
"error": {
"code": "not_found",
"message": "Couldn't find User with 'id'=123"
}
}
Internal Server Error (HTTP 500)
Status: 500 Internal Server Error
{
"error": {
"code": "internal_server_error",
"message": "An unexpected error occurred"
}
}
Last updated
Was this helpful?