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

Define JSON-RPC error codes #2633

Open
alexghr opened this issue Oct 3, 2023 · 0 comments
Open

Define JSON-RPC error codes #2633

alexghr opened this issue Oct 3, 2023 · 0 comments

Comments

@alexghr
Copy link
Contributor

alexghr commented Oct 3, 2023

In #2590 we've talked about adding concrete error codes to errors thrown in public RPC methods. This would help RPC clients work better with the node/PXE by handling errors and presenting human friendly information.

I think an enum listing out all error codes would be a good idea. This would make the error codes easy to document and we'd also ensure uniqueness (e.g. so that clients don't get the same error code for two different API errors).

A dedicated AztecError class that takes a code would be thrown in APIs instead of a plain Error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant