@cfxlabsinc/b2b-services
    Preparing search index...
    SolanaTransactionErrorClass:
        | "INSUFFICIENT_FUNDS"
        | "DETERMINISTIC_PROGRAM_ERROR"
        | "UNKNOWN"

    Classifies failures from sendAndConfirmTransaction so callers can decide whether to retry (transient, e.g. chained-transfer funds not yet settled) or fail fast (deterministic program error).

    Insufficient funds reaches us two ways, and both must be recognised:

    1. Thrown at preflight by HeliusRpcClient.sendTransaction — a plain Error whose message embeds the RPC error JSON and program logs, e.g. sendTransaction failed: …custom program error: 0x1 {"err":{"InstructionError":[3,{"Custom":1}]},"logs":[…"Program log: Error: insufficient funds"…]}

    2. Returned from confirmation by getSignatureStatuses as the structured status.err, e.g. { InstructionError: [n, { Custom: 1 }] } — an object with NO substring and NO logs.

    SPL Token's InsufficientFunds is custom error code 1 (0x1). Our mintfx programs CPI the Token program and propagate that code, so a Custom: 1 at the failing instruction means insufficient funds in the transfer/redeem flows. Other custom codes (e.g. 3012 AccountNotInitialized, 3002 discriminator mismatch) are deterministic and must not be retried.