> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Error handling

> Understand the types of API errors returned by Tesouro, including syntax, validation, service, and system errors with response formats.

Tesouro will present you with errors when a successful response cannot be returned due to invalid data, broken business rules, or an internal critical error.

**Types of errors:**

* [Syntax errors](/acquiring/support/errors/syntax-errors)
* [Validation errors](/acquiring/support/errors/validation-errors)
* [Service errors](/acquiring/support/errors/service-errors)
* [System errors](/acquiring/support/errors/system-errors)

<Note>A declined transaction from the card network is NOT an error.</Note>

Error responses contain:

* `message` - An explanation of what went wrong
* `path` - The mutation or query containing the error
* `code` - A set value Tesouro uses to identify the error.
* `advice` - Information on how to fix and avoid the error if applicable

```json Error structure lines expandable theme={null}
{
  "data": null,
  "errors": [
    {
      "message": "<a message describing the error>",
       "path": [
         "<name of mutation or query"
      ],
      "extensions": {
        "code": "<the error code>"
        ... // <optional additional fields>
      },
      ... // <optional additional fields>
    },
    ... // additional errors, if present
  ]
}
```

### Tips

* If you use a table to lookup, it is important that you key off the “code” and not the “message”, as the code is a set value and should not change.
* In the case of multiple errors occurring within a single request, each error will be listed separately In the array.
* Errors returned by the Tesouro GraphQL API can be expected to be in compliance with the official GraphQL specification.
