Common errors

The APIv2 client can raise exceptions for many reasons. It is advisable to write code that gracefully handles all possible API exceptions. The APIv2 makes a distinction between 3 types of errors:

Network errors

Problems with intermittent communication between client and server can lead to Network Errors. They return low-level errors, like socket or timeout exceptions. When intermittent problems occur, clients are usually left in a state where they don’t know whether or not the server received the request.

Clients should retry the same requests, ideally according to an exponential back off schedule, until they’re able to receive a result from the server. When the failures follow a repetitive pattern, it is very likely a chronic (network) problem.

Content errors

Content error occurs when the API request is invalid. Content errors can be recognized by its HTTP response with a 4xx code. The reason why a certain error occurs is added to the response data.

Integrations should correct the original request, you need to find the part of the request that was wrong and correct it. The response can give you a hint of what part is wrong. You can use our API reference guide to add the correct headers to your request. Two common errors occur when you forget to add a certain header or you enter the wrong or invalid public Id in a certain header. Examples of these responses are shown below:

{
    "data": [
        {
            "message": "Required header",
            "propertyName": "Api-Company"
        }
    ],
    "moreAfter": null,
    "status": "error",
    "type": "Error"
}
{
    "data": [
        {
            "message": "Invalid value",
            "propertyName": "Api-Company"
        }
    ],
    "moreAfter": null,
    "status": "error",
    "type": "Error"
}

Server errors

These errors can occur when there is a problem with one of the IXON servers or when a request takes more than 60 seconds. We strive to make these errors as rare as possible, however, we advise to be able to handle them when they do arise. Server errors can be recognized by an HTTP response with a 5xx code.

When a 500 Internal Server Error occurs, it is most likely during a production incident or the remediation of a production incident. We continually monitor our servers and try to resolve any problems as soon as possible. In the case of a 504 Gateway Timeout and a response time of more than 60 seconds, the error can be prevented by minimizing the scope of the request.