ethereum / ethereum/execution-apis
Standardize JSON-RPC Error codes
- Dominant language
- Io
- Stars
- 1.1k
- Forks
- 530
- Avg merge
- 5d 8h
- Merged PRs (30d)
- 9
Description
Goal:
A standard for JSON-RPC error codes and messages across EVM-compatible chains and execution clients to improve interoperability, facilitate consistent error handling, and provide a better developer experience.
Motivation:
- Different Ethereum clients and EVM-compatible chains often use overlapping error codes or generic messages in their JSON-RPC API responses.
- We can fix that by classifying error groups & pre-allocating error codes to well-known errors that clients rely on and leave space for the future error codes that can be proposed & utilized as needed
- The solution is made possible by the new extension specs that Open-RPC supports to create [error-groups](https://github.com/open-rpc/tools/blob/main/packages/extensions/src/x-error-groups/x-error-groups.json)
Proposal:
[ENG-EIP_ Standardized JSON-RPC Error Codes and Messages-220525-143559.pdf](https://github.com/user-attachments/files/20394493/ENG-EIP_.Standardized.JSON-RPC.Error.Codes.and.Messages-220525-143559.pdf)
PoC:
https://github.com/ethereum/execution-apis/pull/650
rpctestgen Validation PoC:
https://github.com/lightclient/rpctestgen/pull/42
Existing Error codes validation testsuite:
https://github.com/simsonraj/eth-err-tests/tree/master
Contributor guide
Assessment
This issue has not been assessed yet.