Handling Errors
Learn how to troubleshoot common response errors and where to find additional support
Xemplo APIs always return a response. If a request is successful, an HTTP 20x
status is returned with the response. However, if a request fails, Xemplo tries to respond with a detailed message that will help you diagnose what went wrong and how to fix it. The response is accompanied by an Error
object with further details. The Error object contains the following properties:
succeeded
- Aboolean
indicating whether the call succeeded (which will befalse
in error conditions)errors
- An array of error messages with details of the failure.
Possible errors
Status | Description |
---|---|
400 | Bad Request Invalid inputs supplied to the request. More information on the failed validation is available in the errors field of the response. |
401 | Unauthorised Missing or invalid authorization token. |
403 | Forbidden Authorization token supplied, but it does not have the required permissions to perform the given task. |
404 | Not Found The requested resource wasn't found by looking up its ID. |
405 | Method not Allowed Incorrect HTTP method used for the API call. |
409 | Conflict Xemplo cannot update a resource because of a business logic conflict. The logic conflict can vary, depending on the real-life scenario. For example: - Try to add or update an email address for a worker to an email address that is already in use for another worker. - Try to add or update the business registration number of a company to a number that doesn't meet the format requirements for the company's region. - Try to update the details of a position in another company not linked to the API Key instance. |
413 | Payload too Large The payload exceeds the maximum payload of 800000 bytes. |
415 | Unsupported Media Type The endpoint doesn't support the provided media type. Xemplo supports application/json payloads. |
429 | Too many Requests The request is rejected by rate limits. |
500 | Internal Server Error An unexpected error occurred in Xemplo systems. Try the request again after a few seconds. If the error persists, contact Xemplo Customer Support for further assistance and investigation. |
Updated 8 months ago