# Errors and Error Codes

Upon error, a response will contain details to help resolve the error. The response will contain the following fields:

### Error

| Attribute   | Type                  | Description                                                                                                                           |
| ----------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Code        | `string`              | Error code.                                                                                                                           |
| Message     | `string`              | A detailed error message. We recommend not to rely on the message to programmatically handle the error. Use Code to do that instead.  |
| ID          | `string`              | **Optional.** For 500 responses only. If you encounter an error and this field is present, you can send us this ID for our reference. |
| ExtraData   | `string`              | ***Optional.*** Extra data that may be helpful to handle the error. This could be a JSON string.                                      |
| InnerErrors | `array of InnerError` | ***Optional.*** For validation errors specifically. See [InnerError](/api/errors-and-error-codes.md#innererror).                      |

### InnerError

| Attribute | Type     | Description                                                                                                                          |
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| Code      | `string` | Error code.                                                                                                                          |
| Path      | `string` | The name of the request object's attribute that has errors.                                                                          |
| Message   | `string` | A detailed error message. We recommend not to rely on the message to programmatically handle the error. Use Code to do that instead. |


---

# 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.gluwa.com/api/errors-and-error-codes.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.
