Error Handling
The API endpoints respond with HTTP Status Codes, and each API response is associated with an appropriate status code.
HTTP Status Codes:
-
200: Indicates a successful response from the API.
-
204 (No Content): Signifies that a request has succeeded, but the client doesn't need to navigate away from its current page.
-
400 (Bad Request): If a 400 response occurs, check the body of the response for an error message that provides insights into investigating the issue. This could be due to issues with input data.
-
401 (Unauthorized): A 401 response is related to authentication and entitlement. Ensure that you are using the correct authorization information for access.
-
403 (Forbidden): Indicates that accessing the resource you were trying to reach is forbidden.
-
404 (Not Found): Denotes that the requested resource/entity was not found or does not exist.
-
409 (Conflict): Indicates that the request processing will create conflicting consequences.
-
412 (Precondition Failed): This status indicates that a precondition is not met and must be satisfied first.
-
422 (Non-processable Entity): This status code means that the request cannot be processed. Examples include issues with the client account's balance, security, administrative restrictions, etc.
-
500: Typically signifies that something isn't working properly with the API.
In the event of errors, check the body of the response for a description of the problem. The body of error responses follows the following schema:
{
"status": 100,
"timestamp": "2019-08-24T14:15:22Z",
"code": "string",
"message": "string",
"error": "string"
}