# Error

Should an error occur with your request, the aviowiki API will reply with an HTTP response code in the `4xx` or `5xx` range, depending on the type of error.

Errors in the `4xx` range relate to client errors, meaning that something unexpected happened with data supplied or an action requested by the client. This could be bad format or invalid authentication for example.

Errors in the `5xx` range relate to server errors, meaning that an unexpected exception happened in our backend while trying to serve your request.

When an error code is returned, the body of the response will contain a JSON object with the following properties:

| **Property** | **Type** | **Description**                                                                                                                                                     |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `timestamp`  | string   | The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted date and time of when the error occurred on the server. For example `2019-08-30T13:23:32.163+0000` |
| `status`     | number   | The HTTP response code returned. For example `403`                                                                                                                  |
| `error`      | string   | A description of the HTTP response code returned.                                                                                                                   |
| `message`    | string   | A human-readable message explaining what generated the error.                                                                                                       |
| `path`       | string   | The resource path that was requested. This does not include the base URL. For example `/airports/search`.                                                           |

### Example

```
{
  "timestamp": "2019-08-30T13:23:32.163+0000",
  "status": 403,
  "error": "Forbidden",
  "message": "Token expired",
  "path": "/airports/search"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aviowiki.com/data-models/error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
