Class: ProviderRpcError
Defined in: support/wallet-common/lib/errors/eip1193Errors.ts:42
Generic provider RPC error, parent class of specialized classes (one per error code).
The subclasses exist as a convenience when throwing, but should be relied on for detection — use the code field instead.
Extends
Extended by
EIP1193ChainDisconnectedErrorEIP1193DisconnectedErrorEIP1193UnauthorizedErrorEIP1193UnsupportedMethodErrorEIP1193UserRejectedRequestError
Constructors
Constructor
new ProviderRpcError(args: Omit<HappyRpcErrorArgs, "shortMessage"> & {
code: EIP1193ErrorCodes;
}): ProviderRpcError;Defined in: support/wallet-common/lib/errors/eip1193Errors.ts:43
Parameters
args
Omit<HappyRpcErrorArgs, "shortMessage"> & {
code: EIP1193ErrorCodes;
}
Returns
ProviderRpcError
Overrides
HappyRpcError.constructorMethods
toString()
toString(): string;Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:53
Returns a string representation of an object.
Returns
string
Inherited from
Properties
cause?
readonly optional cause: unknown;Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:40
The thing that caused this to be thrown (or a string representation of it in case the error was inflated from serialized form).
Inherited from
code
readonly code:
| 3
| EIP1193ErrorCodes
| EIP1474ErrorCodes;Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:22
Standard RPC error code from EIP1193ErrorCodes or EIP1474ErrorCodes
Inherited from
ctxMessages?
readonly optional ctxMessages: string[];Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:34
This can store extra contextual information, similar to Viem's metaMessages.
We used it to include the RPC URL and the request body, just as Viem would do for its own errors.
Inherited from
details?
readonly optional details: string;Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:28
Additional details provided when throwing the error.
Inherited from
shortMessage
readonly shortMessage: string;Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:25
Short message matching the error code.
