# CCIP v1.6.1 Error Codes and Messages API Reference
Source: https://docs.chain.link/ccip/v1/evm/api-reference/v1.6.1/errors

> For the complete documentation index, see [llms.txt](/llms.txt).

> **NOTE: Integrate Chainlink CCIP v1.6.1 into your project**
>
> ### npm
>
> If you use [NPM](https://www.npmjs.com/), install the [@chainlink/contracts-ccip NPM package](https://www.npmjs.com/package/@chainlink/contracts-ccip):
>
> ```shell
> npm install @chainlink/contracts-ccip@1.6.1
> ```
>
> ### yarn
>
> If you use [Yarn](https://yarnpkg.com/), install the [@chainlink/contracts-ccip NPM package](https://www.npmjs.com/package/@chainlink/contracts-ccip):
>
> ```shell
> yarn add @chainlink/contracts-ccip@1.6.1
> ```
>
> ### foundry
>
> If you use [Foundry](https://book.getfoundry.sh/), install the package:
>
> ```shell
> forge install smartcontractkit/chainlink-ccip@bbab0601244ce58e2ffac0dbc178a80aab1fa4a3
> ```

When invoking the `ccipSend` [function](/ccip/v1/evm/api-reference/v1.6.1/i-router-client#ccipsend), it is possible to encounter various errors. These might be thrown either by the CCIP router or by one of the downstream contracts called by the CCIP router. Below is a compiled list of potential errors you might encounter. Referencing this list will enable you to capture and handle these exceptions gracefully.

## Router Errors

| Error                         | Parameters                 | Error selector | Description                                                           |
| ----------------------------- | -------------------------- | -------------- | --------------------------------------------------------------------- |
| `UnsupportedDestinationChain` | `uint64 destChainSelector` | `0xae236d9c`   | Thrown when sending to an unsupported destination chain.              |
| `InsufficientFeeTokenAmount`  | -                          | `0x07da6ee6`   | Thrown when the fee token amount provided is less than required.      |
| `InvalidMsgValue`             | -                          | `0x1841b4e1`   | Thrown when msg.value is non-zero for non-native fee token payments.  |
| `BadARMSignal`                | -                          | `0xc1483715`   | Thrown when the RMN (Risk Management Network) has cursed the network. |
| `SafeERC20FailedOperation`    | -                          | `0x70c9c181`   | Thrown when an ERC20 token transfer fails.                            |

## OnRamp Errors

| Error                         | Parameters      | Error selector | Description                                                                     |
| ----------------------------- | --------------- | -------------- | ------------------------------------------------------------------------------- |
| `CursedByRMN`                 | -               | `0x53ad11d8`   | Thrown when the RMN (Risk Management Network) has cursed the destination chain. |
| `RouterMustSetOriginalSender` | -               | `0xa4ec7479`   | Thrown when the router has not set the original sender address.                 |
| `MustBeCalledByRouter`        | -               | `0x1c0a3529`   | Thrown when the caller is not the configured router address.                    |
| `CannotSendZeroTokens`        | -               | `0x5cf04449`   | Thrown when attempting to send a token with amount zero.                        |
| `UnsupportedToken`            | `address token` | `0xbf16aab6`   | Thrown when attempting to send an unsupported token.                            |

## FeeQuoter Errors

| Error                                   | Parameters                                                            | Error selector | Description                                                                                                       |
| --------------------------------------- | --------------------------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------- |
| `InvalidExtraArgsTag`                   | -                                                                     | `0x5247fdce`   | Thrown when an invalid extra arguments tag is used.                                                               |
| `MessageTooLarge`                       | `uint256 maxSize`, `uint256 actualSize`                               | `0x86933789`   | Thrown when the message size exceeds the maximum allowed size.                                                    |
| `MessageGasLimitTooHigh`                | -                                                                     | `0x4c4fc93a`   | Thrown when the gas limit exceeds the maximum per-message gas limit.                                              |
| `UnsupportedNumberOfTokens`             | `uint256 numberOfTokens`, `uint256 maxNumberOfTokensPerMsg`           | `0x4c056b6a`   | Thrown when too many tokens are involved in the transfer.                                                         |
| `ExtraArgOutOfOrderExecutionMustBeTrue` | -                                                                     | `0xee433e99`   | Thrown when enforceOutOfOrder is true but allowOutOfOrderExecution is false.                                      |
| `SourceTokenDataTooLarge`               | `address token`                                                       | `0x36f536ca`   | Thrown when the source token data exceeds the configured maximum size.                                            |
| `TokenNotSupported`                     | `address token`                                                       | `0x06439c6b`   | Thrown when a token's price isn't configured or is zero.                                                          |
| `FeeTokenNotSupported`                  | `address token`                                                       | `0x2502348c`   | Thrown when the fee token isn't in the allowed fee tokens list.                                                   |
| `StaleGasPrice`                         | `uint64 destChainSelector`, `uint256 threshold`, `uint256 timePassed` | `0xf08bcb3e`   | Thrown when a gas price is too old based on the chain's staleness threshold.                                      |
| `DataFeedValueOutOfUint224Range`        | -                                                                     | `0x10cb51d1`   | Thrown when price feed values exceed uint224 range.                                                               |
| `DestinationChainNotEnabled`            | `uint64 destChainSelector`                                            | `0x99ac52f2`   | Thrown when attempting to use a disabled destination chain.                                                       |
| `InvalidExtraArgsData`                  | -                                                                     | `0xb00b53dc`   | Thrown when extra args data is missing or malformed.                                                              |
| `MessageFeeTooHigh`                     | `uint256 msgFeeJuels`, `uint256 maxFeeJuelsPerMsg`                    | `0x6a92a483`   | Thrown when message fee exceeds the maximum allowed fee.                                                          |
| `InvalidChainFamilySelector`            | `bytes4 chainFamilySelector`                                          | `0x2ee82075`   | Thrown when an unsupported chain family selector is used.                                                         |
| `InvalidTokenReceiver`                  | -                                                                     | `0x5bed5192`   | Thrown when token receiver is invalid for SVM chains (typically when it's zero and tokens are being transferred). |
| `TooManySVMExtraArgsAccounts`           | `uint256 numAccounts`, `uint256 maxAccounts`                          | `0x8a0d71f7`   | Thrown when too many accounts are specified in SVM extra args.                                                    |
| `InvalidSVMExtraArgsWritableBitmap`     | `uint64 accountIsWritableBitmap`, `uint256 numAccounts`               | `0xafa93308`   | Thrown when SVM writable bitmap is invalid for the number of accounts.                                            |
| `MessageComputeUnitLimitTooHigh`        | -                                                                     | `0x2e2b0c29`   | Thrown when compute unit limit exceeds maximum for SVM chains.                                                    |

## Rate Limiter Errors

| Error                               | Parameters                                                              | Error selector | Description                                                                                    |
| ----------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| `BucketOverfilled`                  | -                                                                       | `0x9725942a`   | Thrown when the token bucket contains more tokens than its capacity.                           |
| `OnlyCallableByAdminOrOwner`        | -                                                                       | `0xf6cd5620`   | Thrown when a function is called by an address that is not the admin or owner.                 |
| `TokenMaxCapacityExceeded`          | `uint256 capacity`, `uint256 requested`, `address tokenAddress`         | `0x1a76572a`   | Thrown when attempting to consume more tokens than the bucket's maximum capacity.              |
| `TokenRateLimitReached`             | `uint256 minWaitInSeconds`, `uint256 available`, `address tokenAddress` | `0xd0c8d23a`   | Thrown when attempting to consume more tokens than currently available in the bucket.          |
| `AggregateValueMaxCapacityExceeded` | `uint256 capacity`, `uint256 requested`                                 | `0xf94ebcd1`   | Thrown when attempting to consume more aggregate value than the bucket's maximum capacity.     |
| `AggregateValueRateLimitReached`    | `uint256 minWaitInSeconds`, `uint256 available`                         | `0x15279c08`   | Thrown when attempting to consume more aggregate value than currently available in the bucket. |

## Token (ERC20) Errors

| Error                                      | Description                                                   |
| ------------------------------------------ | ------------------------------------------------------------- |
| `ERC20: burn amount exceeds balance`       | Thrown when the amount to be burned exceeds the pool balance. |
| `ERC20: transfer amount exceeds allowance` | Thrown when the transfer amount exceeds the allowance.        |

## BurnMintERC20 Errors

| Error               | Parameters                | Error selector | Description                                                                                   |
| ------------------- | ------------------------- | -------------- | --------------------------------------------------------------------------------------------- |
| `MaxSupplyExceeded` | `uint256 supplyAfterMint` | `0xcbbf1113`   | Thrown when a mint operation would cause the total supply to exceed the maximum supply limit. |
| `InvalidRecipient`  | `address recipient`       | `0x17858bbe`   | Thrown when attempting to transfer or approve tokens for the contract itself (address(this)). |

## Token Pool Errors

| Error                      | Parameters                   | Error selector | Description                                                                     |
| -------------------------- | ---------------------------- | -------------- | ------------------------------------------------------------------------------- |
| `InvalidToken`             | `address token`              | `0x961c9a4f`   | Thrown when the token being locked or burned is not supported by the pool.      |
| `CursedByRMN`              | -                            | `0x53ad11d8`   | Thrown when the RMN (Risk Management Network) has cursed the network.           |
| `SenderNotAllowed`         | `address sender`             | `0xd0d25976`   | Thrown when the sender is not on the allowlist (when allowlist is enabled).     |
| `ChainNotAllowed`          | `uint64 remoteChainSelector` | `0xa9902c7e`   | Thrown when the remote chain selector is not supported.                         |
| `CallerIsNotARampOnRouter` | `address caller`             | `0x728fe07b`   | Thrown when the caller is not a valid onRamp for the given chain on the Router. |