Releases: MetaMask/rpc-errors
Releases · MetaMask/rpc-errors
2.0.2
2.0.1
2.0.0
- Exports
errors
renamedethErrors
JsonRpcError
renamedEthereumRpcError
EthJsonRpcError
renamedEthereumProviderError
- It is still a subclass of
EthereumRpcError
- It is still a subclass of
- TypeScript
- Renamed affected interfaces
ethErrors
- Added missing
EIP-1474 errors- Added corresponding codes and messages
- Namespacing
- EIP-1474 (which includes JSON RPC 2.0) errors now namespaced under
ethErrors.rpc
- JSON RPC 2.0 errors were formerly under
errors.jsonRpc
- JSON RPC 2.0 errors were formerly under
- EIP-1193 errors now namespaced under
ethErrors.provider
- Formerly under
errors.eth
- Formerly under
- EIP-1474 (which includes JSON RPC 2.0) errors now namespaced under
- Most error getters now take a single, optional
opts
argument, which
is either a string or an object- If a string, it becomes the error message
- If an object, it should have the form:
{ message?: string, data?: any }
- Special Cases
ethErrors.rpc.server
must receive a single object of the form:- `{ code: number, message?: string, data?: any }
ethErrors.provider.custom
must receive a single of the form:- `{ code: number, message: string, data?: any }
- Added missing
- TypeScript
- Updated affected interfaces