Last updated

Error Handling

Spotnana uses standard HTTP response codes to indicate the success or failure of an API request as per below convention:

  • 2xx Successful – The request was successfully received, understood, and accepted.
  • 4xx Client error – The request contains bad syntax or invalid parameter.
  • 5xx Server error – The server failed to fulfil a request.

Error Details

Apart from HTTP Error codes, API error response has additional application error codes. These error codes give additional information regarding the error. See examples below:

HTTP/1.1 400 Bad Request

{
    "debugIdentifier": "https://debug.services.spotnana.com/file-search-results/5404d15aa99f5e2d4?q=debugid",
    "errorMessages": [
        {
            "errorCode": "INVALID_EMAIL_DOMAIN"
        }
    ]
}

HTTP/1.1 401 Unauthenticated

{
  "debugIdentifier": "https://debug.services.spotnana.com/file-search-results/null_a1fc321663723ce3?q=debugid",
  "errorMessages": [
    {
      "errorCode": "USER_NOT_AUTHENTICATED"
    }
  ]
}