The following error messages are returned from Xero when interacting with their API. These messages are returned to Pest Register when there is an issue with syncing. Xero does not document each individual summary that could be returned, so please refer to the notification for extra details. The following codes are sourced from here

Error Codes:

OK:

  • Error Code: 200

  • Detail: Successful API call

Bad Request:

  • Error Code: 400

  • Detail: A validation exception has occurred

Unauthorized:

  • Error Code: 401

  • Detail: Invalid authorization credentials

Not Found:

  • Error Code: 404

  • Detail: The resource you have specified cannot be found

Precondition Failed:

  • Error Code: 412

  • Detail: One or more conditions given in the request header fields were invalid. This code will also be returned if you're using TLS1.0

Internal Error:

  • Error Code: 500

  • Detail: An unhandled error with the Xero API. Contact the Xero API team if problems persist

Not Implemented:

  • Error Code: 501

  • Detail: The method you have called has not been implemented (e.g. POST Organisation)

Rate Limit Exceeded:

  • Error Code: 503

  • Detail: The API rate limit for your organisation/application pairing has been exceeded. Learn more

Not Available:

  • Error Code: 503

  • Detail: API is currently unavailable – typically due to a scheduled outage – try again soon. Learn more

Organisation Offline:

  • Error Code: 503

  • Detail: The organisation temporarily cannot be connected to. Learn more

Did this answer your question?