@lelantos-org/sdk / index / WalletError
Class: WalletError<C>
Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:38
Base class for every typed SDK error. Subclasses set name, pin code to a literal, and may attach typed fields.
The C parameter makes AnyWalletError a discriminated union, so if (e.code === "INSUFFICIENT_COVER") narrows to InsufficientCoverError without an instanceof chain.
Extends
Error
Extended by
InternalErrorChainRpcErrorNoEvmAccountErrorTxMiningErrorTxRevertedErrorUnsupportedOperationErrorUserRejectedErrorEnvironmentErrorInvalidArgumentErrorNetworkNotDeployedErrorWalletConfigErrorFeeAboveLimitErrorFeeAssetNotQuotedErrorInsufficientBalanceErrorInsufficientCoverErrorNotesHeldErrorNetworkErrorTreeOutOfSyncErrorWireFormatErrorProverArtifactsFailedErrorProverArtifactsMissingErrorProverErrorProverUnavailableErrorDeadlinePassedErrorQuoteStaleErrorRelayerRejectedErrorSpendOutcomeUnknownErrorWorkerRpcErrorX402PaymentError
Type Parameters
| Type Parameter | Default type |
|---|---|
C extends WalletErrorCode | WalletErrorCode |
Constructors
Constructor
new WalletError<C>(
code,
message,
options?
): WalletError<C>;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:49
Parameters
| Parameter | Type |
|---|---|
code | C |
message | string |
options? | WalletErrorOptions & object |
Returns
WalletError<C>
Overrides
Error.constructorProperties
cause?
optional cause?: unknown;Defined in: typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.causecode
readonly code: C;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:39
context
readonly context: ErrorContext;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:46
details?
readonly optional details?: Readonly<Record<string, string | number | boolean>>;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:48
Extra diagnostic scalars for this failure, when any.
message
message: string;Defined in: typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.messagename
name: string;Defined in: typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.nameretryable
readonly retryable: boolean;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:45
Whether the same call, unchanged, may succeed later without user action: a timeout, a 5xx, notes held by an earlier spend. false means retrying as-is will fail the same way.
stack?
optional stack?: string;Defined in: typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stackMethods
withContext()
withContext(extra): this;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:53
Merge additional context in place and return this for rethrowing.
Parameters
| Parameter | Type |
|---|---|
extra | ErrorContext |
Returns
this