@lelantos-org/sdk / core/errors / NetworkError
Class: NetworkError<C> โ
Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:93
HTTP failure after retries, or deadline expired. cause carries the underlying network error.
Generic in its code so AnyWalletError can list one variant per code. A union-typed code is not assignable to { code: "RELAYER_TIMEOUT" }, so without this the Extract behind WalletErrorOf discards this class and every network code narrows to never. The parameter defaults to the full union, so NetworkError still names the class in an annotation.
Extends โ
WalletError<C>
Type Parameters โ
| Type Parameter | Default type |
|---|---|
C extends NetworkErrorCode | NetworkErrorCode |
Constructors โ
Constructor โ
new NetworkError<C>(
code,
url,
message,
opts?
): NetworkError<C>;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:98
Parameters โ
| Parameter | Type |
|---|---|
code | C |
url | string |
message | string |
opts? | WalletErrorOptions & object |
Returns โ
NetworkError<C>
Overrides โ
Properties โ
body? โ
readonly optional body?: string;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:97
Response body of the last failed attempt, truncated.
cause? โ
optional cause?: unknown;Defined in: typescript/lib/lib.es2022.error.d.ts:26
Inherited from โ
code โ
readonly code: C;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:42
Inherited from โ
context โ
readonly context: ErrorContext;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:43
Inherited from โ
message โ
message: string;Defined in: typescript/lib/lib.es5.d.ts:1077
Inherited from โ
name โ
name: string;Defined in: typescript/lib/lib.es5.d.ts:1076
Inherited from โ
stack? โ
optional stack?: string;Defined in: typescript/lib/lib.es5.d.ts:1078
Inherited from โ
status? โ
readonly optional status?: number;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:95
url โ
readonly url: string;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:94
Methods โ
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