Error Handling


 

Error Handling

Our APIs use a standardized approach to error handling.

When an error is thrown, the API provider typically expresses the error in two parts:  

  • HTTP Status Code and Reason

  • Error Payload

In general, a 4xx code indicates a client error while a 5xx code indicates a server error. The payload provides more insight into the cause of the error and solution.

HTTP Error Codes

The following section lists the most common HTTP Error Codes and their meanings:

HTTP Status Code

Definition

Usage Context

400

Bad Request

The request could not be understood due to bad syntax, or an invalid or omitted parameter

401

Unauthorized

Invalid credentials or the access token has expired

403

Forbidden

Requestor does not have valid permissions to the resource

404

Not Found

The resource does not exist or is not known

405

Method Not Allowed

The requested HTTP method is not allowed for the specified resource

409

Conflict

There is a conflict with the current state of the resource

422

Unprocessable Entity

The payload syntax and content type are understood, but the payload conflicts with business rules

500

Internal Server Error

There is an unexpected condition which prevented fulfillment of the request

 

For more information about solutions to these errors, please refer to our FAQs.

For more information about our error handling process, please refer to our API Style Guide.