Complete reference for all ILAL API error codes, organized by failure phase.
All error responses follow a consistent envelope with machine-readable codes and developer-actionable hints:
{
"error": "Bad Request", // HTTP status text
"code": "UNSUPPORTED_TOKEN", // Machine-readable error code
"message": "tokenIn 0xabc... is not a supported token",
"hint": "Supported tokens: WETH (0x4200...0006), tUSDC (0xa486...424D)",
"phase": "preflight", // Where the failure occurred
"details": [...] // Optional: Zod validation errors
}validation → auth → preflight → build → broadcastcode field for programmatic handling; hint for developer display.API_KEY_MISSING401authMissing API KeyNo X-API-Key header in the request
Add the header: X-API-Key: ilal_live_xxx
API_KEY_FORMAT_INVALID401authInvalid API Key FormatThe key does not match the expected pattern
Expected format: ilal_{test|live}_{48 hex characters}
API_KEY_PREFIX_NOT_FOUND401authAPI Key Not FoundNo key with this prefix exists in the database
Verify the key is correct or create a new one in the Dashboard
API_KEY_HASH_MISMATCH401authAPI Key Verification FailedThe key hash does not match any stored key
Use the exact key returned at creation time (shown only once)
API_KEY_INACTIVE401authAPI Key DeactivatedThis key has been revoked or deactivated
Reactivate or create a new key in the API Keys dashboard
API_KEY_EXPIRED401authAPI Key ExpiredThis key has passed its expiration date
Generate a new API key in the dashboard
API_KEY_SCOPE_MISSING403authMissing PermissionYour key lacks the required permission scope
Create a new key with the required permissions
JWT_MISSING401authMissing JWTMissing or malformed Authorization: Bearer header
Include Authorization: Bearer <accessToken> in headers
JWT_INVALID401authInvalid JWTThe access token is invalid or expired
Obtain a new token via POST /auth/login or refresh token flow
INSTITUTION_OWNERSHIP_MISMATCH403preflightWallet Belongs to Another AccountThe userAddress/walletAddress is bound to a different ILAL account
Call POST /onboarding/register with this wallet to rebind it (demo mode)
INVALID_PARAMS400validationRequest Validation FailedOne or more request body fields failed validation
Check the "details" array in the response for specific field errors
INVALID_ADDRESS400validationInvalid Ethereum AddressThe address is not a valid 0x-prefixed 40-char hex string
Provide a valid checksummed Ethereum address
UNSUPPORTED_TOKEN400preflightToken Not SupportedThe token address is not in the current supported token whitelist
Use supported tokens: WETH (0x4200...0006) or tUSDC (0xa486...424D)
SESSION_NOT_ACTIVE412preflightSession Not ActiveNo active compliance session for this wallet. Returned by default from /defi/swap and /defi/liquidity — transaction would revert on-chain. Add ?buildOnly=true to suppress and get unsigned TX anyway.
Testnet: POST /onboarding/activate-session-demo | Production: POST /verify (ZK proof flow)
ALLOWANCE_INSUFFICIENT200preflightInsufficient Allowance (Warning)Token allowance for the router/manager is less than the requested amount
Approve the token to the SwapRouter or PositionManager before broadcasting
RATE_LIMIT_EXCEEDED429authRate Limit ExceededToo many requests per minute
Wait for the rate limit window to reset (60s) or upgrade your plan
BUILD_FAILED400buildTransaction Build FailedCould not construct the transaction calldata
Check token addresses, amounts, and tick ranges
INTERNAL_ERROR500buildInternal Server ErrorUnexpected error during processing
Retry later. If persistent, contact support with the error message
0x036CbD53842c5426634e7929541eC2318f3dCF7e — Circle USDC (pool drained, replaced by tUSDC)
0xe633220f15932428FcA60A1A2C2C48797A180A80 — ComplianceHook v1 (deprecated)
0xdD37A28e15A9592eAAd3f7Df0Ad36e374Af68A80 — ComplianceHook v2 (deprecated)
If your code references any of the above addresses, update to the current configuration shown on the docs overview page.
code field (e.g. SESSION_NOT_ACTIVE) — not the HTTP status or messagephase to know which stage failed: validation → auth → preflight → build → broadcasthint field to developers/operators — it contains actionable next stepsretryAfter value before retryingGET /defi/preflight/:address to check session, balances, and allowances in one call