Skip to content
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

consistent and descriptive json-rpc error codes and messages #1348

Open
dinhani-cw opened this issue Jul 4, 2024 · 1 comment
Open

consistent and descriptive json-rpc error codes and messages #1348

dinhani-cw opened this issue Jul 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request rpc Bugs or requests about the ETH JSON RPC

Comments

@dinhani-cw
Copy link
Contributor

Currently there is not a clear approach of how to respond clients when there is an error, expected or unexpected.

In some cases we provide a custom message, but in other scenarios we pop-up the internal error message.

We should map all possible error responses to a Rust enum and use it as the source of error responses.

@dinhani-cw dinhani-cw added enhancement New feature or request rpc Bugs or requests about the ETH JSON RPC labels Jul 4, 2024
@dinhani-cw dinhani-cw self-assigned this Aug 5, 2024
@marcospb19-cw
Copy link
Contributor

to close this one it's necessary to review errors are raised with anyhow::Error instead of StratusError
https://github.com/search?q=repo%3Acloudwalk%2Fstratus+anyhow%3A%3AResult&type=code
with that, you can spot any unmapped errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rpc Bugs or requests about the ETH JSON RPC
Projects
None yet
Development

No branches or pull requests

2 participants