WDK Docs

Error Code Reference

Stable error taxonomy for API responses, SDK exceptions, and UI recovery flows.

⌘KCommand-palette first navJump:QuickstartAPIErrorsMigrationSecurity
CodeMeaningRecommended Recovery
P402_QUOTE_EXPIREDQuote TTL elapsed before signingRe-request quote and prompt user to sign immediately
P402_ROUTE_UNAVAILABLENo viable route for requested constraintsRelax constraints or switch source asset preference
P402_POLICY_BLOCKED_ROUTEPolicy engine denied selected routeSelect policy-compliant route from quote options
P402_SIGNATURE_REJECTEDUser/agent declined signing requestSurface non-fatal retry action and preserve draft intent
P402_AUTH_INVALIDMalformed/invalid authorization payloadRebuild typed data from server intent and re-sign
P402_INSUFFICIENT_BALANCEInsufficient token balance for routeOffer fallback route or ask for top-up
P402_SETTLEMENT_TIMEOUTSettlement not finalized in SLA windowPoll settlement status with idempotency key
P402_RECEIPT_UNAVAILABLEReceipt generation delayed/unavailableRetry receipt fetch with backoff; keep txHash visible

HTTP Mapping Guidelines

  • Use 400 for malformed payload/auth failures, 409 for replay/idempotency conflicts, and 422 for policy denials.
  • Use 503 when route liquidity is temporarily unavailable.
  • Always include `code`, `message`, and optional `details` in error payloads.