Skip to main content
Every error response includes a machine-readable code field in the error object. Use these codes to build targeted error handling in your application.

Error Response Format

Complete Error Code Reference

Client Errors (4xx)

CodeHTTP StatusDescriptionCommon CausesResolution
INVALID_PARAMS400Missing or invalid request parametersRequired parameter not provided; invalid chain ID; malformed token addressCheck the details field for the specific parameter and fix your request
VALIDATION_ERROR400Request body failed schema validationWrong data types; extra fields; nested object structure incorrectCompare your request body against the API documentation
INVALID_BODY400Request body could not be parsed or was emptyPOST/PUT request with no JSON body; malformed JSON; wrong Content-TypeSet Content-Type: application/json and send a non-empty JSON body
SLIPPAGE_ERROR400Price moved beyond slippage toleranceMarket volatility; low liquidity pool; slippage too tightIncrease the slippage parameter or get a fresh quote
PARTNER_FEE_EXCEEDS_MAX400Configured partner fee exceeds the platform maximumPartner fee config has a value above the platform’s allowed capContact Hypermid support to negotiate higher fee terms
PARTNER_WALLET_NOT_REGISTERED400Partner fee wallet not registered for this ecosystemSwap settles to an ecosystem (e.g. solana, near) where you have no fee walletRegister a wallet via PUT /v1/partner/me/fee-wallets
ECOSYSTEM_NOT_CONFIGURED400Requested ecosystem is not configured for this partnerTrying to use NEAR Intents / Tron / etc. before the ecosystem is enabled for your accountContact Hypermid support to enable the ecosystem for your partner account
UNAUTHORIZED401Invalid or missing API keyWrong API key; expired key; accessing partner-only endpoint without a keyVerify your API key in the X-API-Key header
NO_ROUTE_FOUND404No swap route available for the given parametersUnsupported token pair; amount too low; no liquidity; chains not connectedTry different tokens, higher amounts, or wider slippage
RATE_LIMIT429Too many requestsExceeded 30 req/min (anonymous) or 100 req/min (partner)Wait until meta.rateLimit.reset and implement exponential backoff

Server Errors (5xx)

CodeHTTP StatusDescriptionCommon CausesResolution
TRANSACTION_BUILD_FAILED500Failed to construct the swap transactionInsufficient balance; token approval needed; contract interaction failureRetry the request; if persistent, try a different route or tool
INTERNAL_ERROR500Unexpected server errorBug in the API server; database error; configuration issueRetry with exponential backoff; contact support if persistent
UPSTREAM_ERROR502Error from an upstream providerAn upstream routing provider returned an errorRetry after a brief delay; try excluding the failing tool with denyTools
RPC_FAILURE502Blockchain RPC node errorRPC node down; network congestion; chain reorganizationRetry after a brief delay
UPSTREAM_MAINTENANCE503Upstream provider is in scheduled maintenanceLI.FI, NEAR Intents, or RampNow announced a maintenance windowWait and retry; check upstream provider status pages for the window
SERVICE_UNAVAILABLE503Hypermid is temporarily unavailableMaintenance; deployment; overwhelming trafficRetry with exponential backoff; check API status
TIMEOUT504Request timed outComplex route calculation; slow RPC responsesRetry with exponential backoff
UPSTREAM_TIMEOUT504Upstream provider timed outAn upstream provider took too long to respondRetry after a delay; consider using a different tool

Error Handling Example

For comprehensive error handling patterns, see the Error Handling Guide.