API Errors (Quote/Route Request)
When requesting a Composer quote viaGET /quote or POST /advanced/routes, the API may return errors. These follow the standard LI.FI error format:
- HTTP status code (e.g., 200, 404, 429, 500)
- LI.FI error code (numeric)
- Error message (human-readable)
Relevant API Error Codes
For the complete list of API error codes, see Error Codes.
Tool Errors
The API may also return tool-specific errors describing issues with the underlying protocols. These use theToolError format:
Relevant Tool Error Codes
Example: Handling Tool Errors
Transaction Failures
Pre-Execution Simulation Failure
Composer simulates the entire execution path before returning a quote. If simulation fails, the API returns an error instead of a transaction that would revert onchain. This protects users from wasting gas on failed transactions. Common simulation failure causes:- The vault is not accepting deposits (paused, full, or restricted)
- The token path involves incompatible tokens
- Insufficient liquidity in the swap path
Onchain Transaction Revert
In rare cases, a transaction may revert onchain even after passing simulation (e.g., due to mempool front-running or rapid state changes between simulation and execution). If this happens:- The user’s tokens remain in their wallet (for same-chain atomic transactions)
- Gas fees for the reverted transaction are still consumed
- Retry with a fresh quote to get updated simulation results
Cross-Chain Failure Modes
Cross-chain Composer flows have two phases. Each phase is atomic within its chain, but the overall flow is eventually consistent.Status Values
PollGET /v1/status to track cross-chain Composer transactions. The status values are:
Substatus Values
When Status is PENDING
When Status is DONE
When Status is FAILED
Handling Cross-Chain Failures
Common Composer Issues
Related Pages
Error Codes
Complete LI.FI API error code reference
Status Tracking
Full status and substatus reference
API Parameters
Composer-specific API parameters
Limitations
Current Composer limitations

