# Error handling

Spotnana uses the following standard HTTP response codes to indicate the status of an API request:

* `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.


## Checking Spotnana system status

If you receive `5xx` errors, timeouts, or delayed webhook deliveries, check the
**Spotnana status page:** [https://status.spotnana.com](https://status.spotnana.com) before you debug your integration.

The status page shows:

- **Current status** of Spotnana services. The **APIs** group lists each API area
(for example, Authentication, Air, Hotel, Car, Trip Management, Payments, and Webhooks).
- **Incidents**, including issues caused by third-party suppliers, with updates until they are resolved.
- **Scheduled maintenance** and other planned changes that may need action on your side.
- **Uptime history** for the past 90 days.


If the status page shows that all systems are operational and the issue continues,
contact your Spotnana account manager and share the `debugIdentifier` from the error response.

## Sample error message

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`

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

Sample 2: `HTTP/1.1 401 Unauthenticated`

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

## Known error codes

| Status Code | Error Code  | Context | Description  | Resolution  |
|  --- | --- | --- | --- | --- |
| `429` | `TOO_MANY_REQUESTS` | [Generating an authentication token](/spotnana/authentication) | Rate limit for the [auth endpoint](/openapi/authapi/authentication/fetchoauth2token) has been exceeded.  **Note:** Applies to the `/v2/auth/oauth2-token` and `/get-auth-token` endpoints. | Reuse existing tokens in subsequent API calls until they expire. |
| `400` | `INVALID_USER_IDS_QUERY_PARAMS` | [Searching for a user](/openapi/usersapi/users/queryuser) | The `companyId` or `tmcId` provided in the query params are not valid UUIDs. | Verify that `companyId` and `tmcId` are valid UUIDs. |
| `400` | `API_VALIDATION_FAILED` | Any API | The request body does not match the expected schema. | Check the request body against the expected schema and correct any mismatches. |