@lelantos-org/sdk / core/errors / WalletError
Class: WalletError<C> โ
Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:41
Base class for every typed SDK error. Subclasses set name, pin code to a literal, and may attach typed context 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 โ
WalletConfigErrorInvalidArgumentErrorEnvironmentErrorNetworkNotDeployedErrorNetworkErrorWireFormatErrorProverErrorProverArtifactsMissingErrorProverArtifactsFailedErrorWorkerRpcErrorInsufficientCoverErrorPermitRejectedErrorDepositAdapterErrorSelectionErrorX402PaymentErrorTxMiningErrorInternalError
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/core/errors.d.ts:44
Parameters โ
| Parameter | Type |
|---|---|
code | C |
message | string |
options? | WalletErrorOptions |
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/core/errors.d.ts:42
context โ
readonly context: ErrorContext;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:43
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.namestack? โ
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/core/errors.d.ts:46
Merge additional context in place and return this for rethrowing.
Parameters โ
| Parameter | Type |
|---|---|
extra | ErrorContext |
Returns โ
this