Skip to main content

Errors

Connect API follows standard HTTP status codes to communicate error information in a consistent and compliant manner following RFC7807

  • HTTP status codes will be 4xx or 5xx when there's a problem
  • The body of the response will be a JSON object
  • The errors property contains an array giving specific details of one or more errors that occurred.

Status codes in the 4xx range

These status codes indicate an issue with the request that needs to be resolved. Once the issue is fixed, you can safely retry the call. Common examples include authentication errors (HTTP status code 401) or request body validation errors (HTTP status code 400).

Status codes in the 5xx range

These errors typically indicate server-side issues, ranging from configuration problems (which may be specific to a merchant or entity) to internal network connectivity issues. They can be transient, affecting only a single call, or persistent, impacting multiple calls over an extended period. In most cases, callers will be unable to resolve these issues on their own. The most common example of 5xx errors is timeouts.

Example

{
"title": "Invalid request parameters",
"status": 400,
"detail": "Invalid request parameters",
"errors": [
{
"code": "MISSING_CONDITIONAL_MANDATORY_FIELD",
"detail": "Field(s) [first_name, last_name, email, address] cannot be null when field [id] is equal to [null]",
"json_path": "$.subscriber.id"
},
{
"code": "GENERIC_ERROR",
"detail": "must not be empty",
"json_path": "$.purchase_location"
}
],
"correlation_id": "daaccc90-dd03-471c-a892-0e8c5ec27026"
}