# Errors

We use standard HTTP Error codes - some are detailed below for reference. Additionally, where an error has occurred we attempt to return the message in the JSON response in either `messages` or `error_messages`

{% hint style="info" %}
The `response` section of the API response details the HTTP response codes.  HTTP response codes are also set but we would recommend parsing the [`response`](/api-response-structure.md#response) section of the returned JSON for errors rather than relying on the HTTP response code.
{% endhint %}

| code | code\_description | message / details                                                                                                                                                                           |
| ---- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | Ok                | The query was successful irrespective of whether the results give a positive response                                                                                                       |
| 400  | Bad Request       | Likely returned if a parameter is missing from a query.  The `message` value will detail the parameter that is missing.  Check this documentation for the correct parameter values.         |
| 401  | Unauthorized      | It's likely your Subscription Key or API Key are not valid                                                                                                                                  |
| 403  | Forbidden         | Your subscription doesn't allow for the call made or you've implemented Whitelist restrictions in your control panel - please check these settings allow your system to connect             |
| 404  | Not Found         | You've requested a page or search query that doesn't exist. **PLEASE NOTE** - we also return a 404 in the event that no results have been found                                             |
| 422  | Unprocessable     | The structure of the query is correct, but one of the parameters contains an invalid value.  Where possible, the system will use default values to mitigate but this isn't always possible. |
| 503  | Maintenance       | We're currently undertaking some maintenance.  We currently have a nightly maintenance routine that runs for circa 1 hour.                                                                  |


---

# 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.api.mybuggymycar.com/errors.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.
