Error Handling

Every erred response contains an error object such as:

{
"error": {
"code": "INVALID_REQUEST",
"message": "Invalid request",
"requestId": "c4e5fcb8-5e44-4dd6-9ac0-d71429cdd44c",
"details": {
"age": ["min value is 0"]
}
}
}

The error object contains the following properties:

  • code: a string defining type of error (see error codes below for more details)

  • message: a string describing the error in a more humanly readable way,

  • requestId: the unique string identifier of your request, used for debug purposes,

  • details: an object or array with more details about the issue. In this example, client had sent a negative age, hence the invalid request.

All endpoints would use the same error structure for the body, whatever the response code.

Error Codes

Code

HTTP Status

Description

INVALID_REQUEST

400

The list of provided parameters was invalid.

ACCESS_DENIED

403

Missing or invalid token (it should be in the x-api-key header).

NOT_FOUND

404

The endpoint, or one of your entity, has not been found.

METHOD_NOT_ALLOWED

405

The method used to request and endpoint is not supported (eg. POST instead of GET)

UNSUPPORTED_MEDIA_TYPE

415

The request header Content-Type was not found or invalid (the Tint API only supports application/json).

INTERNAL_ERROR

500

Something wrong happened on our side. We have been alerted, no need to contact us.

PREDICTION_ERROR

500

An error occurred while calculating one of your prediction. There are probably some unhandled edge cases in your model configuration.

DATA_SOURCE_ERROR

500

An issue occurred with an external data vendor.

‚Äč