-
Notifications
You must be signed in to change notification settings - Fork 435
JSON RPC Error codes standardization: open-rpc extension specs [A Sample implementation] #650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Error groups - Extended open-rpc spec sample implementation
Co-authored-by: Zane Starr <[email protected]>
STOP THIS A.I. SLOP NOW!!!!!!!!!!!! |
@sambacha this is not AI, but the culmination of many months and pretty close to a year of work, to put together a PR that can help move the ecosystem forward. If you have a criticism of the PR or something about it's content please feel free to comment with something constructive or instructive. If you don't have anything constructive to add to this conversation, please refrain from spamming the PR with comments |
meta data extension
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. This inconsistency confuses end users and developers, complicates cross-client tooling, and hampers interoperability.
Solution Abstract
This is made possible by extending the Open-RPC spec to support Extension specs, particularly by utilizing the x-error-group extension spec
This solution aims to address the inconsistent error codes by categorising common error scenarios
Each category could have a reserved range (200 in this case) error codes allotted between (-31999 to -30000), excluding the ranges specified in the JSON-RPC 2.0 specification.
Example: Below is an example categorisation to imagine how the standardization could look like & can be amended as per feedback with different stakeholders
Expected Error codes response validation implementation can be found here