Spotnana uses the following standard HTTP response codes to indicate the status of an API request:
2xxSuccessful – The request was successfully received, understood, and accepted.4xxClient error – The request contains bad syntax or invalid parameter.5xxServer error – The server failed to fulfil a request.
Apart from the standard HTTP error codes, the error response contains a errorMessages > errorCode field that gives you additional context about the error.
Here are some sample API error responses:
Sample 1: HTTP/1.1 400 Bad Request
{
"debugIdentifier": "https://debug.services.spotnana.com/file-search-results/5404d15aa99f5e2d4?q=debugid",
"errorMessages": [
{
"errorCode": "INVALID_EMAIL_DOMAIN"
}
]
}
Sample 2: HTTP/1.1 401 Unauthenticated
{
"debugIdentifier": "https://debug.services.spotnana.com/file-search-results/null_a1fc321663723ce3?q=debugid",
"errorMessages": [
{
"errorCode": "USER_NOT_AUTHENTICATED"
}
]
}When generating an authentication token if you encounter the 429 Rate limit exceeded status with the following error:
{
"errorCode": "TOO_MANY_REQUESTS"
}It indicates that the rate limit for the auth endpoint has been exceeded.
Note: API calls to the
/v2/auth/oauth2-tokenand/get-auth-tokenendpoints are rate limited. We recommend reusing the existing tokens in subsequent API calls until they expire.