Use this file to discover all available pages before exploring further.
The Nexus SDK provides structured error handling through the NexusError class. All errors include a specific error code, message, and optional contextual data.
Errors triggered by user decisions or cancellations.
USER_DENIED_INTENT
Description: User rejected the intent in the intent hook.When it occurs: When deny() is called in setOnIntentHook()User action: None - user intentionally cancelled the operationExample:
Description: User rejected the token approval request.When it occurs: When deny() is called in setOnAllowanceHook()User action: None - user intentionally cancelledExample:
Description: User rejected the signature request for the intent.When it occurs: When user declines to sign in their walletUser action: None - user cancelled signatureRecovery: User can retry the operation
USER_DENIED_SIWE_SIGNATURE
Description: User rejected the Sign-In with Ethereum (SIWE) signature.When it occurs: During initial authenticationUser action: None - user cancelled authenticationRecovery: Retry authentication when ready
Errors related to insufficient balances or fund availability.
INSUFFICIENT_BALANCE
Description: Not enough tokens available for the operation.When it occurs: When attempting to bridge or transfer more than available balanceUser action:
Check available balance with getBalancesForBridge()
Deposit more funds
Reduce the amount
Example:
// Check max before bridgingconst max = await sdk.calculateMaxForBridge({ token: 'USDC', toChainId: 137,});console.log(`Max available: ${max.amount} USDC`);
NO_BALANCE_FOR_ADDRESS
Description: No balance found for the specified address.When it occurs: When querying balances for an address with no tokensUser action: Verify the address is correct and has been fundedRecovery: Fund the address or check a different address
Errors from invalid input parameters or configuration.
INVALID_INPUT
Description: Invalid parameters provided to SDK method.When it occurs: When parameters don’t meet validation requirementsUser action: Check parameter types and valuesCommon causes:
Negative amounts
Invalid chain IDs
Malformed addresses
INVALID_ADDRESS_LENGTH
Description: Address has incorrect length (not 42 characters for Ethereum addresses).When it occurs: When providing malformed Ethereum addressesUser action: Verify address format (should start with 0x and be 42 characters)Example: 0x742d35Cc6634C0532925a3b8D4C9db96c4b4Db45 (correct)
INVALID_VALUES_ALLOWANCE_HOOK
Description: Invalid values passed to allow() in allowance hook.When it occurs: When allowance hook receives invalid approval amountsUser action: Use valid values: 'min', 'max', or a bigint amountExample:
Description: The specified token is not supported by the SDK.When it occurs: When requesting operations with unsupported tokensUser action: Use supported tokens (ETH, USDC, USDT, USDM)Recovery: Check Supported Tokens reference
Description: SDK method called before initialization.When it occurs: When calling SDK methods before initialize() completesUser action: Call initialize() before using SDK methodsExample:
const sdk = new NexusSDK({ network: 'mainnet' });await sdk.initialize(window.ethereum); // Required!await sdk.getBalancesForBridge(); // Now safe to call
SDK_INIT_STATE_NOT_EXPECTED
Description: SDK in unexpected initialization state.When it occurs: Internal state management errorUser action: Re-initialize the SDKRecovery: Create a new SDK instance
WALLET_NOT_CONNECTED
Description: No wallet connected to the SDK.When it occurs: When provider is not set or wallet not connectedUser action: Connect wallet before SDK operationsExample:
await sdk.initialize(window.ethereum);
CONNECT_ACCOUNT_FAILED
Description: Failed to connect to wallet account.When it occurs: When wallet connection failsUser action:
Errors related to blockchain networks and configuration.
CHAIN_NOT_FOUND
Description: Specified chain ID not found in supported chains.When it occurs: When using unsupported chain IDsUser action: Use supported chain IDsRecovery: Check Supported Networks reference
CHAIN_DATA_NOT_FOUND
Description: Chain data unavailable (RPC or configuration issue).When it occurs: Network connectivity issues or chain configuration errorsUser action:
Check internet connection
Verify RPC endpoints are accessible
Retry after a moment
VAULT_CONTRACT_NOT_FOUND
Description: Vault contract not found for the specified chain.When it occurs: Internal configuration errorUser action: Contact support - this indicates a configuration issue
ENVIRONMENT_NOT_SUPPORTED
Description: Specified environment is not supported.When it occurs: When using invalid network configurationUser action: Use 'mainnet' or 'testnet' for network parameter
Description: Blockchain universe not supported (e.g., non-EVM chains).When it occurs: When attempting unsupported blockchain typesUser action: SDK currently supports EVM-compatible chains only
Common causes: Insufficient allowance, slippage, contract conditions not met
TRANSACTION_CHECK_ERROR
Description: Error checking transaction status.When it occurs: RPC or network issues when querying transactionUser action: Retry the status checkRecovery: Check transaction manually on block explorer
FETCH_GAS_PRICE_FAILED
Description: Failed to fetch current gas price.When it occurs: RPC error when querying gas pricesUser action:
Errors related to intent processing and solver network.
LIQUIDITY_TIMEOUT
Description: Solver liquidity timeout - no solver accepted the intent.When it occurs: When no solver can fulfill the intent within timeoutUser action:
Retry after a few minutes
Reduce transfer amount
Try different source chains
Note: This may indicate temporary liquidity constraints
RATES_CHANGED_BEYOND_TOLERANCE
Description: Token price moved too much since quote.When it occurs: Significant price movement during operationUser action:
Refresh intent/quote
Retry operation
Accept new rates
RFF_FEE_EXPIRED
Description: Request for funds (RFF) fee quote expired.When it occurs: Quote expired before executionUser action: Retry operation to get fresh quote
DESTINATION_REQUEST_HASH_NOT_FOUND
Description: Destination request hash not found.When it occurs: Internal tracking errorUser action: Contact support with operation details
DESTINATION_SWEEP_ERROR
Description: Error sweeping funds on destination chain.When it occurs: Final fund collection failedUser action: Contact support - funds may need manual recovery
Description: Internal SDK error.When it occurs: Unexpected internal stateUser action:
Report to support with full error details
Include error.data and error.stack
Provide reproduction steps
UNKNOWN_SIGNATURE
Description: Unknown signature type encountered.When it occurs: Unexpected signature formatUser action: Contact support - this indicates an integration issue
ASSET_NOT_FOUND
Description: Requested asset not found in configuration.When it occurs: When querying unsupported assetUser action: Verify asset/token symbol or address
COSMOS_ERROR
Description: Cosmos chain-specific error.When it occurs: Operations involving Cosmos chainsUser action: Check Cosmos configuration and network status
FEE_GRANT_REQUESTED
Description: Fee grant was requested (Cosmos chains).When it occurs: Fee grant mechanism triggeredUser action: Contact support for fee grant setup