Skip to main content
This page provides actionable playbooks for handling errors from the LI.FI API. For each error, you’ll find the cause, whether to retry, what to change, and how to communicate with users.

HTTP Status Codes

400 Bad Request

Cause: Invalid parameters in the request. Common Causes:
  • Missing required parameters
  • Invalid token address format
  • Invalid chain ID
  • Amount is 0 or negative
  • fromAddress not a valid address

404 Not Found

Cause: No route available for the requested transfer. Common Causes:
  • Token pair not supported
  • Amount too small (below minimum)
  • Amount too large (exceeds liquidity)
  • Bridge temporarily unavailable

429 Too Many Requests

Cause: Rate limit exceeded. Backoff Strategy:
Prevention:
  • Use an API key for higher limits
  • Cache chain and token data
  • Batch requests where possible

500 Internal Server Error

Cause: Server-side issue.

503 Service Unavailable

Cause: Service temporarily down or overloaded.

API Error Codes

The API returns error codes in the response body. Handle these specific scenarios:

NO_POSSIBLE_ROUTE

Cause: No bridge or DEX can fulfill the request. Suggestions:

AMOUNT_TOO_LOW

Cause: Transfer amount is below minimum threshold.

AMOUNT_TOO_HIGH

Cause: Amount exceeds available liquidity.

INSUFFICIENT_LIQUIDITY

Cause: Not enough liquidity in pools.

Slippage Error (code 1007)

Cause: Price impact exceeds slippage tolerance.
In status responses, slippage issues appear as substatus SLIPPAGE_EXCEEDED.

TOOL_TIMEOUT

Cause: Bridge or DEX response timeout.

CHAIN_NOT_SUPPORTED

Cause: Requested chain is not available.

TOKEN_NOT_SUPPORTED

Cause: Token is not available for transfers.

Transaction Errors

Errors that occur during transaction execution (not API errors):

execution reverted

Cause: Smart contract rejected the transaction.

insufficient funds

Cause: Wallet doesn’t have enough balance.

user rejected

Cause: User declined the transaction in their wallet.

nonce too low

Cause: Pending transaction with same nonce.

Error Handling Template


Quick Reference