The Nexus SDK uses a structured error system with specific error codes for different failure scenarios. All SDK errors are instances ofDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/availproject/nexus-sdk/llms.txt
Use this file to discover all available pages before exploring further.
NexusError.
NexusError class
All SDK errors extend theNexusError class, providing consistent error structure and metadata.
Always
'NexusError'Specific error code from
ERROR_CODES. See Error codesHuman-readable error message
Additional error context and details
Methods
Serialize error to JSON-compatible object for logging or transmissionReturns:
Basic error handling
Error codes
All error codes are available in theERROR_CODES constant.
User action errors
Errors caused by user denials or cancellations.User rejected the intent in the intent hookUser action: None - user cancelled the operation
User rejected token approval in the allowance hookUser action: None - user cancelled the operation
User rejected the signature request for intentUser action: None - user cancelled the operation
User rejected SIWE (Sign-In with Ethereum) signatureUser action: None - user cancelled the operation
Balance and fund errors
Not enough tokens for the requested operationUser action: Show current balance and suggest deposit or reduce amount
No balance found for the specified addressUser action: Verify the address is correct
Validation errors
Invalid parameters provided to SDK methodUser action: Check input values and types
Address has incorrect length (not 20 bytes)User action: Verify address format is valid
Invalid values passed to
allow() in allowance hookUser action: Check allow() argumentsRequested token is not supported on the networkUser action: Use a supported token (ETH, USDC, USDT, USDM)
Initialization errors
SDK method called before initializationUser action: Call
await sdk.initialize(provider) firstSDK is in an unexpected initialization stateUser action: Re-initialize the SDK
No wallet is connectedUser action: Connect wallet before proceeding
Failed to connect to wallet accountUser action: Retry wallet connection
Chain and network errors
Specified chain ID is not found or supportedUser action: Use a supported chain ID
Chain data is unavailableUser action: Check network connection and retry
Vault contract not found for the specified chainUser action: Contact support
Environment is not supportedUser action: Use ‘mainnet’ or ‘testnet’
Unknown environment specifiedUser action: Check SDK configuration
Transaction errors
Transaction timed out waiting for confirmationUser action: Retry operation or check block explorer
Transaction was reverted by the blockchainUser action: Check contract state and parameters
Error occurred while checking transaction statusUser action: Retry status check
Failed to fetch current gas priceUser action: Retry operation
Operation errors
Transaction simulation failedUser action: Check parameters and balances
Failed to get quote for swap or bridgeUser action: Retry operation
Swap operation failedUser action: Retry or adjust swap parameters
Refund request failedUser action: Contact support with intent ID
Error checking refund statusUser action: Retry status check
Intent and solver errors
Solver liquidity timeout - no solver could fulfill the intentUser action: Retry later or reduce amount
Exchange rate moved too much since quoteUser action: Refresh quote and retry
Request for funds fee has expiredUser action: Retry operation to get new quote
Destination request hash not foundUser action: Contact support
Error sweeping funds on destination chainUser action: Contact support
Allowance errors
Slippage exceeded the approved allowanceUser action: Increase allowance amount
Error setting token allowanceUser action: Retry approval transaction
Other errors
Internal SDK errorUser action: Contact support with error details
Unknown signature type encounteredUser action: Contact support
Requested asset not foundUser action: Check token address and chain
Error on Cosmos chainUser action: Check Cosmos configuration
Universe/chain type not supportedUser action: Use supported chain
Fee grant was requestedUser action: Contact support