Errors API Reference
When invoking the ccipSend
function, 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.
Error | Parameters | Description |
---|
UnsupportedDestinationChain | | Thrown when the destination chain is not supported. |
InsufficientFeeTokenAmount | - | Thrown when the CCIP fees are paid with native tokens, but not enough is sent with the transaction. |
InvalidMsgValue | - | Thrown when the CCIP fees are not paid in native tokens, but msg.value is non-zero. |
Error | Parameters | Description |
---|
NotAFeeToken | | Thrown when an unsupported fee token is used. |
UnsupportedToken | | Thrown when an unsupported transfer token is used. |
InvalidAddress | | Thrown when the receiver address is invalid. |
InvalidExtraArgsTag | - | Thrown when an invalid extra arguments tag is used. |
RouterMustSetOriginalSender | - | This error should never be thrown as the router always sets the sender. |
MustBeCalledByRouter | - | This error should never be thrown as the router always makes the call. |
MessageGasLimitTooHigh | - | Thrown when the gas limit is too high. |
UnsupportedNumberOfTokens | - | Thrown when too many tokens are involved in the transfer. |
SenderNotAllowed | | Thrown when the sender is not allowlisted. |
MaxFeeBalanceReached | - | Thrown when the onRamp has reached its maximum fee storage capacity. If it is full, it cannot process new transactions. |
Error | Parameters | Description |
---|
PriceNotFoundForToken | | Thrown when a price cannot be found for a specific token. |
BucketOverfilled | - | This error should never be thrown as it indicates an invalid bucket state. |
AggregateValueMaxCapacityExceeded | - uint256 capacity
- uint256 requested
| Thrown when the user requests to transfer more value than the capacity of the aggregate rate limit bucket. |
TokenMaxCapacityExceeded | - uint256 capacity
- uint256 requested
- address tokenAddress
| Thrown when the user requests to transfer more of a token than the capacity of the bucket. |
AggregateValueRateLimitReached | - uint256 minWaitInSeconds
- uint256 available
| Thrown when the user requests to transfer more value than currently available in the bucket. The user might have to wait for at least minWaitInSeconds for enough availability or transfer the currently available amount. |
TokenRateLimitReached | - uint256 minWaitInSeconds
- uint256 available
- address tokenAddress
| Thrown when the user requests to transfer more of a token than currently available in the bucket. The user might have to wait at least minWaitInSeconds for enough availability, or transfer the currently available amount. |
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. |
Error | Parameters | Description |
---|
ChainNotSupported | | Thrown when a chain is not supported. |
StaleGasPrice | - uint64 destChainSelector
- uint256 threshold
- uint256 timePassed
| Thrown when the gas price is stale. |
TokenNotSupported | | Thrown when a token is not supported. |
StaleTokenPrice | - address token
- uint256 threshold
- uint256 timePassed
| Thrown when the price of a token is stale. |