Skip to main content

Error Handling

The API endpoints will response with HTTP Status Codes. API responses will have appropriate status codes.

HTTP Status Codes

  • 200: If an API endpoint responds with 200, it's success.

  • 204 (No Content): Indicates that a request has succeeded, but that the client doesn't need to navigate away from its current page.

  • 400 (Bad Request): In this case, you can check the body of the response and find an error message that will help you investigate the problem further. It may be just an input data has issues.

  • 401 (Unauthorized): In an event of a 401 response, which's related to authentication and entitlement, you need make sure that you’re using the correct authorization info for the access.

  • 403 (Forbidden): Accessing the resource you were trying to reach is forbidden.

  • 404 (Not Found): Request resource/entity was not found or it does not exist.

  • 409 (Conflict): The request processing will create or has conflicting consequences.

  • 412 (Precondition Failed): A precondition is not met, satisfied. This precondition has to be satisfied firstly.

  • 422 (Unprocessable Entity): Status code means that the request cannot be processed. Some examples of such cases: the client account may have issues in its balance, security, administrative restriction, etc.

  • 500: typically means that something isn't working properly with the API.

In the event you receive errors, then check the body of the response, it usually includes a description of the problem.

The body of the error responses have the floowing schema:

{
"status": 100,
"timestamp": "2019-08-24T14:15:22Z",
"code": "string",
"message": "string",
"error": "string"
}