-
Notifications
You must be signed in to change notification settings - Fork 299
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
Standardise the Engine JSON-RPC error codes #8695
Standardise the Engine JSON-RPC error codes #8695
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks nice so far.
I have some comments and I think we should add some tests in Web3JClientTest
...client/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/JsonRpcErrorCodes.java
Outdated
Show resolved
Hide resolved
...cutionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/Web3JClient.java
Outdated
Show resolved
Hide resolved
Hey @tbenr |
Hey @Malaydewangan09 I don't see the update on the Enum front. Can you double check? |
…wangan09/teku into standardise-json-rpc-error-codes
Hey @tbenr, my bad. |
...client/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/JsonRpcErrorCodes.java
Outdated
Show resolved
Hide resolved
WRT testing you could: take inspiration from |
...client/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/JsonRpcErrorCodes.java
Outdated
Show resolved
Hide resolved
...client/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/JsonRpcErrorCodes.java
Outdated
Show resolved
Hide resolved
...client/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/JsonRpcErrorCodes.java
Outdated
Show resolved
Hide resolved
7e468d5
to
dc68ccc
Compare
…wangan09/teku into standardise-json-rpc-error-codes
...client/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/JsonRpcErrorCodes.java
Outdated
Show resolved
Hide resolved
Ah yes, that would be a more concise error message. |
sorry I got confused by repetition of |
@tbenr |
@Malaydewangan09 Yes, I was suggesting to make the test more realistic and thus less confusing. The message from the server could be something more verbose like "engine_newPaylad method has been called with invalid parameters" |
…wangan09/teku into standardise-json-rpc-error-codes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the contribution!
@tbenr Thanks for your consistent feedback! |
PR Description
This pull request standardises the handling of JSON-RPC error codes in the Web3JClient::doRequest method according to the JSON-RPC 2.0 specification. It introduces specific error code handling for well-known JSON-RPC errors and customizes error messages to reduce unnecessary stack trace logging.
Fixed Issue(s)
fixes #8671
Documentation
doc-change-required
label to this PR if updates are required.Changelog