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 success

  • Codes in the 4xx range indicate errors that failed given the information provided

  • Codes in the 5xx range indicate errors with our servers

Error Response Format

All error responses follow a consistent format:

Error Response
{
  "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

Error Code
Description

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)

Response Headers
Status: 401 Unauthorized
Response Body
{
  "error": {
    "code": "invalid_token",
    "message": "The provided authentication token is invalid"
  }
}

Resource Not Found (HTTP 404)

Response Headers
Status: 404 Not Found
Response Body
{
  "error": {
    "code": "not_found",
    "message": "Couldn't find User with 'id'=123"
  }
}

Internal Server Error (HTTP 500)

Response Headers
Status: 500 Internal Server Error
Response Body
{
  "error": {
    "code": "internal_server_error",
    "message": "An unexpected error occurred"
  }
}

Last updated

Was this helpful?