Skip to main content
Every error thrown or returned by the SDK has a typed code and a human-readable message. Switch on code; show message only as a debug aid (don’t display verbatim to end users).
try {
  // ...
} catch (err) {
  if (err.code === "INTENT_DEADLINE_PAST") { /* ... */ }
}

Validation errors

Returned by intent.build() and intent.submit() when input is malformed.
CodeMeaningWhat to do
INTENT_DEADLINE_PASTdeadline is in the pastRecompute deadline
UNSUPPORTED_CHAINsourceChain or destChain not supportedCheck supported chains
UNSUPPORTED_ASSETtokenIn or tokenOut not supported on the given chainUse a supported asset
AMOUNT_BELOW_MINIMUMamountIn below the per-asset minimumIncrease the amount
AMOUNT_ABOVE_MAXIMUMamountIn above the per-asset maximumReduce the amount or split into multiple intents
INVALID_RECIPIENTrecipient is malformedValidate address format
MIN_OUTPUT_INVALIDminAmountOut is zero, negative, or exceeds amountIn notionalSet a sensible slippage floor
METADATA_TOO_LARGEmetadata exceeds the size limitTrim metadata

Liquidity errors

Returned by intent.submit() and surfaced in failed status events.
CodeMeaningWhat to do
NO_SOLVER_AVAILABLENo solver took the intent before deadlineRetry with longer deadline or wider minAmountOut
MIN_OUTPUT_UNATTAINABLESolvers can’t deliver minAmountOut at current ratesLower minAmountOut (accept more slippage)

Rate limiting

CodeMeaningWhat to do
RATE_LIMITED (HTTP 429)Platform intent throughput ceiling hitBack off exponentially with jitter; see rate limits
WEBHOOK_SIGNATURE_INVALIDHMAC verification failed on a webhook delivery (when webhooks ship)Check your secret; reject the request
There is no API key, so no auth errors. Signature-protected endpoints (recipient flows, settle) reject per-request signatures with 400 and a specific message.

Network errors

CodeMeaningWhat to do
RPC_UNREACHABLESource-chain RPC failed during validationRetry with backoff
TACHYON_API_UNREACHABLEThe relayer at https://relayer.tachyon.pe is not respondingRetry with backoff; real-time status is surfaced in the user dashboard at testnet.app.tachyon.pe
REQUEST_TIMEOUTRequest exceeded the SDK’s internal timeoutRetry; consider raising requestTimeoutMs in SDK options

Settlement errors

Surfaced in failed status events. None of these result in lost funds, the user is automatically refunded via the on-chain escape mechanism.
CodeMeaning
SETTLEMENT_REVERTEDDestination tx reverted; refund initiated
EXECUTION_TIMEOUTSolver did not complete settlement within the protocol’s execution window; refund initiated
INTENT_EXPIREDDeadline passed before any solver took the intent; refund initiated

Recipient / sweep errors

CodeMeaningWhat to do
VIEWING_KEY_MISSINGNo viewing key loaded in the SDK sessionRegister the recipient via POST /recipient/register and import the viewing key
SAFE_NOT_DEPLOYEDThe Safe at the stealth address hasn’t been deployed yetDeploy via POST /recipient/deploy-safe first
RELAY_PROXY_REVERTEDThe Safe’s execTransaction reverted on-chainInspect the target call; funds remain safe at the stealth Safe

Handling pattern

async function safeSubmit(intent: SignedIntent) {
  let attempt = 0;
  while (attempt < 3) {
    try {
      return await tachyon.intent.submit(intent);
    } catch (err) {
      if (err.code === "RATE_LIMITED" || err.code === "TACHYON_API_UNREACHABLE") {
        await delay(2 ** attempt * 500);
        attempt++;
        continue;
      }
      throw err; // validation/liquidity errors don't benefit from retry
    }
  }
  throw new Error("submit failed after retries");
}

Rate limits

Platform throughput limits.