WDK Docs
Error Code Reference
Stable error taxonomy for API responses, SDK exceptions, and UI recovery flows.
| Code | Meaning | Recommended Recovery |
|---|---|---|
| P402_QUOTE_EXPIRED | Quote TTL elapsed before signing | Re-request quote and prompt user to sign immediately |
| P402_ROUTE_UNAVAILABLE | No viable route for requested constraints | Relax constraints or switch source asset preference |
| P402_POLICY_BLOCKED_ROUTE | Policy engine denied selected route | Select policy-compliant route from quote options |
| P402_SIGNATURE_REJECTED | User/agent declined signing request | Surface non-fatal retry action and preserve draft intent |
| P402_AUTH_INVALID | Malformed/invalid authorization payload | Rebuild typed data from server intent and re-sign |
| P402_INSUFFICIENT_BALANCE | Insufficient token balance for route | Offer fallback route or ask for top-up |
| P402_SETTLEMENT_TIMEOUT | Settlement not finalized in SLA window | Poll settlement status with idempotency key |
| P402_RECEIPT_UNAVAILABLE | Receipt generation delayed/unavailable | Retry 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.