-
Notifications
You must be signed in to change notification settings - Fork 486
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
Fix JSONRPC error codes to be the same as in geth #897
base: master
Are you sure you want to change the base?
Conversation
/cla run-cla-check |
@fairax The commands could not be executed: Access denied to command "run-cla-check" |
/cla run-cla-check |
Queueing command execution: run-cla-check |
@sorpaas Command execution has finished. |
Can you provide a better link for the "JSON RPC Error Codes Improvement Proposal"? That wiki page links to another website's wiki page, but it never mentions 32603. |
Relevant line in geth code https://github.com/ethereum/go-ethereum/blob/093b2ac32ac96fdf89cd80ca8fe40cb9c9fc8f49/internal/ethapi/api.go#L1029. Error code |
If there is no selector it is still a revert and thus should have error |
Probably, but it is not how geth behaves. There are tests for different cases https://github.com/abdulgalimov/ethereum-and-unique-errors-analysis and for example call to method |
Co-authored-by: nanocryk <[email protected]>
Changes JSONRPC error code for revertal to be
3
and default error code to be-32000
instead of-32603
. This behavior is the same as in geth which is referring to https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal.