# Error handling

Toggle returns descriptive messages for any returned errors (as opposed to error codes or numbers).

For this reason, we recommend that you shouldn't try to re-interpret error strings to your own UI, and instead use them verbatim.

Here's an example error response:

```javascript
{
  "errors": [
    {
      "message": "validation",
      "locations": [
        {
          "line": 2,
          "column": 29
        }
      ],
      "validation": {
        "currency": [
          "This field is required"
        ]
      },
      "customer_facing": false
    }
  ],
  "data": {
    "createBalanceAdjustment": null
  }
}
```


---

# 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://developers.usetoggle.com/graphql/error-handling.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.
