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

# Errors

> Error codes and responses returned by the swap API when requests cannot be fulfilled

The swap APIs return the following errors when a request cannot be fulfilled.

## Validation errors

| Error                       | HTTP status | Description                                                                                                         |
| --------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
| Swaps not enabled           | 403         | Swaps are not enabled for your app. [Enable swaps](/wallets/actions/swap/setup) in the Privy Dashboard.             |
| Unsupported chain           | 400         | The `caip2` chain identifier is not a [supported chain](/wallets/actions/swap/overview#supported-chains).           |
| Same input and output token | 400         | The `input_token` and `output_token` must be different.                                                             |
| Unsupported wallet type     | 400         | The wallet type is not supported for swap operations. Swaps are available for EVM and Solana wallets.               |
| Gas sponsorship not enabled | 400         | [Gas sponsorship](/wallets/gas-and-asset-management/gas/setup) is required but not enabled for your app.            |
| Insufficient token balance  | 400         | The wallet does not have enough of the input token to cover the swap amount. Returned for `exact_input` swaps only. |

## Routing errors

| Error                    | HTTP status | Description                                                                                                                                                                       |
| ------------------------ | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No quotes available      | 400         | No swap route could be found for the given token pair, amount, or chain. This can occur if the token pair lacks liquidity or the token address is invalid on the specified chain. |
| Token or route not found | 404         | The specified token or swap route does not exist. Verify that the token addresses are correct for the target chain.                                                               |
| Rate limited             | 429         | The request was rate limited. Retry after a brief delay.                                                                                                                          |
