Handling Errors

Handling Errors

Signals uses conventional HTTP response codes to indicate the success or failure of a request. Requests in the 2xx range indicate success, the 4xx range indicate failure in the information provided (invalid credentials, missing params), and the 5xx range indicate an error with Signals' servers (very rare).

Error Response Object

Within the error response object, we provide a set of attributes to help you understand the error.

  • type: Category of error
  • error_code: Specific error code to help you identify the error
  • message: Helpful, human-readable error (typically with a hint about how to resolve) description
  • http_status_code: HTTP status code of the response
  • request_id: Unique request ID for each API request

An example is,

{
  "error": {
    "type": "INVALID_REQUEST_PARAMETERS",
    "error_code": "invalid_email",
    "message": "Email is invalid",
    "http_status_code": 400,
    "request_id": "c63702e6-dd85-4ca0-8199-d554f09e8176"
  }
}