Errors

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:
  • The JWT token has expired.
  • The token that you have used is in the wrong format
  • You are using an incorrect token.
  • You have entered any token in the authorisation header.
  • You must get a new JWT token for accessing the Export API resources.
  • Verify the token format.
  • Use the correct refresh token
  • Check whether you have entered the token in the authorisation header.
  • If the token has expired, initiate a new authorisation request.
  • Review the token format.
  • Ensure that you are using the correct refresh token and it has not expired.
  • Check whether you have entered the correct token in the authorisation header.
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.