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

# Errors

> Error response format and error codes returned by the Cross-chain API.

Failed requests return a JSON body with a name, a numeric code, a message, and an HTTP status. `cause` adds detail when available.

```json theme={null}
{
  "error": "QuoteExpired",
  "code": 7001,
  "msg": "Intent quote has expired. Please try again.",
  "cause": "",
  "status": 400
}
```

Branch on `code` or `error`. `msg` and `cause` are for logs and can change.

## Request errors

| Code | Name | HTTP | Meaning |
| - | - | - | - |
| 2000 | `InvalidArgument` | 400 | A request field is missing or malformed. |
| 2001 | `Unexpected` | 500 | Unexpected server error. Retry the request. |
| 2002 | `Unavailable` | 400 | The requested resource is not available. |
| 2003 | `QueryFailed` | 400 | A lookup the request depends on failed. |
| 2004 | `IntentStatus` | 422 | The intent is not in a status that allows this operation, such as executing an intent that already started. |
| 8000 | `NotFound` | 400 | The intent or resource does not exist. |
| 8008 | `UnsupportedNetwork` | 422 | A chain in the request is not supported. See [supported networks](https://docs.polygon.technology/cross-chain/networks.md). |
| 8009 | `ClientOutdated` | 422 | The client version is no longer supported. Upgrade `0xtrails` or `@0xtrails/api`. |

## Quote errors

| Code | Name | HTTP | Meaning |
| - | - | - | - |
| 7000 | `IntentsSkipped` | 400 | The transfer needs no route, such as a same-token transfer on the same chain. Send it directly. |
| 7001 | `QuoteExpired` | 400 | The quote is older than 15 minutes. Request a new quote. |
| 7002 | `HighPriceImpact` | 422 | No route is available without excessive price impact. Try a smaller amount or a different token. |
| 7003 | `FeeOnTransferToken` | 422 | Tokens that charge a fee on transfer are not supported. |
| 7004 | `RebasingToken` | 422 | Rebasing tokens are not supported. |

## Service errors

| Code | Name | HTTP | Meaning |
| - | - | - | - |
| 9000 | `IntentsDisabled` | 400 | Routing is temporarily unavailable. Retry later. |
| 9001 | `ChainNodeHealth` | 503 | A chain in the route is temporarily unreachable. Retry later. |

## Authentication errors

The OMS API gateway rejects requests with a missing or invalid `Api-Key` before they reach the Cross-chain API. These return HTTP 401 with `InvalidCredentials` (code 1003). Check that the key is a publishable key and that its mode matches the host. See [authentication](https://docs.polygon.technology/cross-chain/api-reference/overview.md#authentication).

## Failed intents

An intent that fails after execution starts does not return an error response. It can reach `FAILED`, `REFUNDED`, or `ABORTED`. Its receipt's `statusReason` explains the outcome, such as slippage, a provider failure, or a receipt timeout. See [status and history](https://docs.polygon.technology/cross-chain/api-reference/monitoring.md).

## In the SDK

SDK functions throw these errors as exceptions. `getPrettifiedErrorMessage(error)` turns one into a message you can show the customer. See [React hooks](https://docs.polygon.technology/cross-chain/sdk/hooks.md#errors).
