# Error responses

All errors follow a consistent structure:

```json
{
  "error": {
    "code": "not_found",
    "message": "The requested resource could not be found.",
    "status": 404
  }
}
```

| Status | Meaning                                   |
| ------ | ----------------------------------------- |
| `400`  | Bad request — check your request body     |
| `401`  | Unauthorized — missing or invalid API key |
| `403`  | Forbidden — insufficient permissions      |
| `404`  | Not found                                 |
| `429`  | Rate limited — back off and retry         |
| `500`  | Server error                              |

{% hint style="warning" %}
This API is for demo purposes only — **don't** use it in production.
{% endhint %}


---

# 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://keobongdaio.gitbook.io/keobongdaio-docs/api-reference/reference/welcome-to-the-gitbook-petstore-api/error-responses.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.
