Account Demolisher
Reference

Failure reference

The failure taxonomy, which kinds are retryable, and every typed error the codebase raises.

There is no central error-code enum. Failures are classified at the flow level by FailureKind, and individual subsystems raise their own typed errors.

The failure taxonomy

classifyFailure lowercases the message and matches in this exact order. Order is load-bearing.

#Matched substringsKindRetryable
1tx_bad_seq, bad_seqbad_seqYes
2position(s) still open, still open, defi positionposition_openNo
3account_merge blocked, not mergeable, mergeablenot_mergeableNo
4footprint, restorepreamble, restore, archived, entry_expiredchanged_footprintYes
5failed on-chainrevertedNo
6signing_failed, failed to sign, sign thesigningYes
7timed out, timeout, network, fetch, 502, 503, 504, bad gateway, service unavailablenetworkYes
8anything elseunknownYes

Diverged-state stops are checked before the footprint bucket on purpose. A "positions still open" or "not mergeable" message whose protocol detail happens to mention archived or restore must trigger rediscovery, not be retried as a footprint race.

The three non-retryable kinds are the ones where retrying cannot help: the account is not mergeable, a position is still open, or the contract reverted.

Typed errors

ErrorRaised byCarries
AllowlistViolationThe signing-time contract gateviolations, a list of every blocked invocation with its reason
UnsafeRevokeErrorThe revoke guardA reason, prefixed Refusing to sign revoke:
UnsafeTransferErrorThe token-transfer guardA reason, prefixed Refusing to sign token transfer:
SimulationErrorSoroban simulationerrorCode, diagnostic events
SimulationFailedErrorPlan simulationnodeId, upstreamError
AccountNotFoundErrorThe account audit, on a Horizon 404publicKey
SlippageGuardTrippedThe slippage guardexpected, minimumAccepted, actual, slippageBps
AquariusBudgetErrorAquarius chained swapshops, limit (4, the Soroban budget cap)
SoroswapProxyErrorThe Soroswap proxy clientcode, status, op
FxDAOClientNotConfiguredThe FxDAO clientA message
BodyTooLargeErrorServer body readinglimit (16,384 bytes)

Reading an unknown error

errorMessage(err, fallback) resolves a message in this order: an Error with a non-empty message, a non-empty string, a non-null object with a string message property, then the fallback.

The third case exists for a specific reason. The Soroban RPC client in the Stellar SDK rejects with a plain { code, message } object rather than an Error, so a bare instanceof Error check silently discards the real message, such as startLedger must be within the ledger range: 3517481 - 3638440, and String(err) renders the useless [object Object].

Submission-level classification

Two narrower classifiers run inside the executor, separate from FailureKind:

  • Classic rejections map Horizon result codes to fee, resequence, reprice, or terminal.
  • Soroban rejections map messages to resequence, footprint, or terminal.

Both are documented with their exact matched strings in Execution and recovery.

Guard messages that stop a merge

These are plain errors thrown by the merge guard, and all three are non-retryable:

account_merge blocked: <reason>[: <detail>]

account_merge blocked: N Soroban DeFi position(s) still open (...).
Close them before merging, or the funds will be stranded on the deleted account.

account_merge blocked: could not confirm your DeFi positions are all closed (...).
This is a safety stop so an unreadable position isn't merged around and stranded.

Slippage bounds

ConstantValue
DEFAULT_SLIPPAGE_BPS100
MIN_SLIPPAGE_BPS10
MAX_SLIPPAGE_BPS500
BPS_DENOMINATOR10,000

On this page