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

Engine API: adjust error codes with JSON-RPC 2.0 spec #214

Merged
merged 3 commits into from
May 5, 2022

Conversation

mkalinin
Copy link
Collaborator

@mkalinin mkalinin commented May 3, 2022

According to JSON-RPC 2.0 spec, the range [-32768; -32000] is reserved for pre-defined errors. Applications should use values outside of this range.

This PR updates existing error codes. It might be a breaking change if a logic of any CL client relies on exact error code value (-32001).

Copy link
Member

@lightclient lightclient left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I don't think the actual number matters, but as a point of reference I see the LSP spec starts their LSP-specific errors at -32899 and ends it at -32800.

lightclient
lightclient approved these changes May 4, 2022
@mkalinin
Copy link
Collaborator Author

mkalinin commented May 4, 2022

Good catch. I don't think the actual number matters, but as a point of reference I see the LSP spec starts their LSP-specific errors at -32899 and ends it at -32800.

Credits to @MicahZoltu on this finding. If we want to have this spec as a reference, let us have -32800: Unknown payload-32801: Unknown payload, and so forth

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

Successfully merging this pull request may close these issues.

3 participants