Skip to content

Conversation

lightclient
Copy link
Member

I used Microsoft's Language Server Protocol spec as some inspiration for this update: https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#codeLensClientCapabilities

I find this format clearer and more consistent.

Regarding the errors, I have updated the Unknown Payload error to -32001, because the JSON-RPC 2.0 spec explicitly allocated -32000 to -32099 for "implementation specific" errors. It would be great to enumerate the possible errors a client could return during execution of the API, but I think this is an uphill battle. For this reason, I've set aside -32000 as a catch all for exceptions that may occur in an execution client while serving a request. This appears to be the behavior that geth's RPC currently provides.

@lightclient lightclient requested a review from djrtwo October 15, 2021 13:02
@lightclient
Copy link
Member Author

cc @mkalinin

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

Looks like a reasonable approach to me

Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
@djrtwo djrtwo changed the title Revamp request/response description and explictly list all errors Engine API: Revamp request/response description and explictly list all errors Oct 18, 2021
@djrtwo djrtwo merged commit 4b58884 into ethereum:main Oct 27, 2021
@mkalinin
Copy link
Contributor

This change looks good to me! 👍 A tiny cleanup is here #90

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