Class: abstract
HappyRpcError
Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:20
Parent class of all errors that can be triggered by a call to the happy RPC provider.
You can rely on check for the subclasses of this: ProviderRpcError and EthereumRpcError.
Error codes are expected to belong to EIP1193ErrorCodes or EIP1474ErrorCodes
Extends
Extended by
Methods
toString()
toString(): string;
Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:53
Returns a string representation of an object.
Returns
string
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).
Overrides
Error.cause
code
readonly code:
| 3
| EIP1193ErrorCodes
| EIP1474ErrorCodes;
Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:22
Standard RPC error code from EIP1193ErrorCodes or EIP1474ErrorCodes
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.
details?
readonly optional details: string;
Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:28
Additional details provided when throwing the error.
shortMessage
readonly shortMessage: string;
Defined in: support/wallet-common/lib/errors/HappyRpcError.ts:25
Short message matching the error code.