Variable: GSWAP_ERROR_PHASE_BY_CODE
const GSWAP_ERROR_PHASE_BY_CODE: object
The phase of every DEX catalog code, WITHOUT the catalog. The failure guards (classifyFailure,
mayHaveBeenQueued, ...) need only a code's phase, and the catalog's English templates are
~15 kB: reading the phase from here keeps an app shell that imports a guard from loading them.
The catalog entry is still where a code is declared; this table is checked against it AT
COMPILE TIME, in both directions (a missing code, an extra code or a different phase is a type
error), so the two cannot drift. The core codes' phases are core's GALA_ERROR_PHASE_BY_CODE.
classify failure may have been queued gala error phase by code
Type Declaration
| Name | Type |
|---|
AMOUNT_IS_JS_NUMBER | "pre_send" |
AMOUNT_NEGATIVE | "pre_send" |
AMOUNT_NOT_FINITE | "pre_send" |
AMOUNT_NOT_POSITIVE | "pre_send" |
AT_MOST_ONE_OF_ALLOWED | "pre_send" |
BOUNDS_VIOLATION | "post_send" |
CHAIN_DISPATCH_FAILED | "post_send" |
CHAIN_REJECTED | "post_send" |
CONFIRMATION_ABORTED | "post_send" |
CONFIRMATION_FAILED | "post_send" |
CONFIRMATION_KEY_MISMATCH | "post_send" |
CONFIRMATION_MALFORMED | "post_send" |
CONFIRMATION_TIMEOUT | "post_send" |
CREATE_POOL_NEEDS_CLASS_KEY | "pre_send" |
DTO_INVALID | "post_send" |
DTO_NOT_CANONICAL | "pre_send" |
EXACT_AMOUNT_REQUIRED | "pre_send" |
EXACTLY_ONE_OF_REQUIRED | "pre_send" |
GATEWAY_DATA_MISSING | "post_send" |
GATEWAY_MODE_INVALID | "post_send" |
GATEWAY_REJECTED | "post_send" |
GATEWAY_REPORTED_ERROR | "post_send" |
GATEWAY_SYNC_REQUEST_TRADE | "post_send" |
HTTP_ERROR | "post_send" |
INCOMPLETE_TOKEN_CLASS_KEY | "pre_send" |
INSUFFICIENT_LIQUIDITY | "post_send" |
INVALID_CHAIN_RESPONSE | "post_send" |
INVALID_DTO | "pre_send" |
INVALID_FEE | "pre_send" |
INVALID_LIMIT | "pre_send" |
INVALID_MARKET_TOKEN | "pre_send" |
INVALID_PAGE | "pre_send" |
INVALID_POLL_INTERVAL | "pre_send" |
INVALID_POSITION_RESPONSE | "post_send" |
INVALID_PRICE_BOUNDS | "pre_send" |
INVALID_PRICE_RANGE | "pre_send" |
INVALID_PRICE_VALUES | "pre_send" |
INVALID_SEASON_ID | "pre_send" |
INVALID_SORT_BY | "pre_send" |
INVALID_SORT_ORDER | "pre_send" |
INVALID_SQRT_PRICE | "pre_send" |
INVALID_STARTING_PRICE | "pre_send" |
INVALID_TICK_RANGE | "pre_send" |
INVALID_TICK_SPACING | "pre_send" |
INVALID_TIMEFRAME | "pre_send" |
INVALID_TOKEN_CLASS_KEY | "pre_send" |
INVALID_TOKEN_DECIMALS | "pre_send" |
INVALID_TRADING_SYMBOL | "pre_send" |
METHOD_NOT_ALLOWED | "post_send" |
METHOD_NOT_SUPPORTED | "pre_send" |
MISSING_UNIQUE_KEY | "post_send" |
MISSING_WALLET_ADDRESS | "pre_send" |
NO_POOL_AVAILABLE | "post_send" |
NO_SIGNER | "pre_send" |
NO_VALID_TRADING_SYMBOL | "pre_send" |
NO_WALLET_ADDRESS | "post_send" |
NON_CANONICAL_PAIR | "pre_send" |
POOL_MISMATCH | "pre_send" |
PRICE_BOUNDS_ORDER | "pre_send" |
PRICE_VALUES_IS_JS_NUMBER | "pre_send" |
RATE_LIMITED | "post_send" |
REQUEST_FAILED | "in_flight" |
SEARCH_TOO_LONG | "pre_send" |
SHADOW_NOT_QUEUED | "post_send" |
SHADOW_SUBMIT_NEEDS_WALLET_ADDRESS | "pre_send" |
SIGNATURE_INVALID | "post_send" |
SIGNER_MISMATCH | "post_send" |
STREAM_API_KEY_UNUSABLE | "pre_send" |
STREAM_CLOSED_BEFORE_CONNECT | "in_flight" |
STREAM_CONNECT_FAILED | "in_flight" |
STREAM_CONNECTION_CLOSED | "in_flight" |
STREAM_DISCONNECTED | "in_flight" |
STREAM_NOT_CONNECTED | "pre_send" |
STREAM_REQUEST_TIMEOUT | "in_flight" |
STREAM_WEBSOCKET_UNAVAILABLE | "pre_send" |
SUBMISSION_OUTCOME_UNKNOWN | "in_flight" |
SYMBOL_CONFLICT | "post_send" |
SYMBOL_DISAGREES_WITH_REGISTRY | "pre_send" |
SYMBOL_NOT_FOUND | "pre_send" |
TICKS_NOT_ALIGNED | "pre_send" |
TICKS_NOT_INTEGERS | "pre_send" |
TICKS_OUT_OF_BOUNDS | "pre_send" |
TOKEN_RESOLUTION_FAILED | "pre_send" |
TOKEN_SYMBOL_NOT_REGISTERED | "pre_send" |
UNIQUE_KEY_MISMATCH | "post_send" |
UNKNOWN_TOKEN | "pre_send" |
UNORDERABLE_SYMBOLS | "pre_send" |
UPDATE_REQUIRED | "post_send" |
amount is js number pre send negative not finite positive at most one of allowed bounds violation post chain dispatch failed rejected confirmation aborted key mismatch malformed timeout create pool needs class dto invalid canonical exact required exactly gateway data missing mode reported error sync request trade http incomplete token insufficient liquidity response fee limit market page poll interval position price range values season id sort by order sqrt starting tick spacing timeframe decimals trading symbol method supported unique wallet address no available signer valid non pair rate limited in flight search too long shadow queued submit signature stream api unusable closed before connect connection disconnected connected websocket unavailable submission outcome unknown conflict disagrees with registry found ticks aligned integers out resolution registered unorderable symbols update