Pleo uses HTTP status codes to indicate the success and failure of API requests.
In general, codes in the2xx
range indicate Success
; the request is successfully received, understood, and accepted. Whereas, codes in the 4xx
range indicate a client error — the request contains bad syntax or cannot be fulfilled. Errors in the 5xx
indicate a server error — the server failed to fulfil an apparently valid request.
Here is a generic list of error codes with their descriptions:
Code | Error Type | Definition/Reasons | Resolution |
---|---|---|---|
400 | Bad Request | The server could not understand the request due to invalid syntax. | This error occurs when required information is missing or there is a validation error. Hence, review your request and ensure that you have entered all the mandatory data and the information is in the correct format. |
401 | The client's request is unauthorised. This may occur for any of the following reasons:
|
|
|
403 | Forbidden | The client does not have enough access to perform the intended action. | Contact your developer partner manager for providing you access. |
404 | Not Found | The server cannot find the requested resource | Review your request — either you have entered incorrect information or the resource does not exist. |
500 | Internal server error | The server has encountered a situation that it does not know how to handle. | Retry your request after some time. |
502 | Bad gateway | The server, while acting as a gateway or proxy, received an invalid response from the upstream server. | Retry your request after some time. |
503 | Service unavailable | The server is not ready to handle the request, primarily due to being overloaded or the server is under maintainence. | Retry your request after some time. |