Skip to main content

Variable: SHADOW\_SUBMIT\_CODES

gSwap SDK 2.0.0-rc.4


gSwap SDK 2.0.0-rc.4 / SHADOW_SUBMIT_CODES

Variable: SHADOW_SUBMIT_CODES

const SHADOW_SUBMIT_CODES: readonly ["SHADOW_UNAVAILABLE", "SHADOW_UNSUPPORTED_TYPE", "SHADOW_RELAY_REJECTED"]

Defined in: packages/gswap-sdk/dist/index.d.ts:1286

Machine-readable codes the swap backend returns in a shadow failure body ({ code, message }, with no statusCode; the HTTP status carries the number).

  • SHADOW_UNAVAILABLE (503): marking failed or infra not configured; retryable. Never fall back silently to a public swap.
  • SHADOW_UNSUPPORTED_TYPE (400): shadow requested on a non-swap method.
  • SHADOW_RELAY_REJECTED: terminal business rejection (slippage, balance, ...), not retryable; message is the gateway's verbatim string.