Skip to main content

Variable: GALA\_ERROR\_PHASES

GalaChain core SDK 1.0.0-rc.8


GalaChain core SDK 1.0.0-rc.8 / index / GALA_ERROR_PHASES

Variable: GALA_ERROR_PHASES

const GALA_ERROR_PHASES: readonly ["pre_send", "in_flight", "post_send"]

Defined in: packages/gala-core-sdk/dist/index.d.ts:21

How far an operation had got when it failed, measured against the request it exists to send: for a write, the POST that carries the signed DTO to the gateway; for a read, the GET.

  • pre_send: NOTHING was transmitted. Everything up to the request (validation, symbol resolution, the signer, the wallet, a key provider) ran and failed, so no write can have been queued. A write that failed pre_send is never "maybe applied".
  • in_flight: the request left (or may have left) and no answer was read: a timeout, a broken connection, a stream that dropped. For a write the outcome is unknown.
  • post_send: an answer was read, or the write was already accepted: a refusal, an acknowledgement that proves nothing, an unusable body, and every failure of a confirmation.

Each catalog entry (core's and every product SDK's) declares the phase its code is thrown in; a throw site where the same code can occur in another phase overrides it (GalaErrorContext.phase). It is a typed property of every GalaSDKError (error.phase).

This module has no imports, on purpose: it is the closed set of phases, shared by the catalogs, the light phase tables (error_phase_table.ts) and the failure view.