Skip to main content

Error Handling

TrexWallet detects errors as early as possible (insufficient funds, invalid state, AML block, duplicate ids, network unavailability, …). A transaction or atomic batch either completes in full or leaves balances and states unchanged.

Where errors surface

  • API: every endpoint returns the canonical ApiResponse<T> envelope with an integer error code and an English message — see Error Handling process for the exact payload and the public error-code reference.
  • Transaction state: terminal-outcome flags Canceled (32), Failed (64), plus the Blocked (16) waiting flag are part of TransactStateEnum. See Transaction States.
  • Address-transaction state: Cancelation (2048), Failed (4096), Timeout (1024), and AmlBlocked (128) describe network/settlement-side outcomes.

Atomicity and propagation

If any entry in a batch fails, the whole group is rolled back — there is no "some succeeded, some did not" state. See Atomicity and Batch Operations.

What operators should do

Stuck rows (long-running Blocked, Predicted with no progress, AmlBlocked) are inspected and resolved in the corresponding admin pages — see Transactions and Orders admin and Payment Orders admin.