Skip to content

Releases: MetaMask/rpc-errors

2.0.2

12 Feb 18:46
352e65b
Compare
Choose a tag to compare
  • Fix faulty null checks throughout codebase (764832d)

2.0.1

31 Jan 20:20
Compare
Choose a tag to compare
  • Add error codes to docstrings (5452001)

2.0.0

03 Nov 00:32
53d76f6
Compare
Choose a tag to compare
  • Exports
    • errors renamed ethErrors
    • JsonRpcError renamed EthereumRpcError
    • EthJsonRpcError renamed EthereumProviderError
      • It is still a subclass of EthereumRpcError
    • 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
      • EIP-1193 errors now namespaced under ethErrors.provider
        • Formerly under errors.eth
    • 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 }
  • TypeScript
    • Updated affected interfaces