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

Improve json rpc error message #221

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

zsluedem
Copy link
Collaborator

@zsluedem zsluedem commented Oct 7, 2023

res: "{\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32603,\"message\":\"Unknown error when simulating validation on entry point. Error message: JsonRpcError(JsonRpcError { code: -32015, message: \\\"VM execution error.\\\", data: Some(String(\\\"Reverted 0x220266b600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e41413430206f76657220766572696669636174696f6e4761734c696d69740000\\\")) })\"},\"id\":1}"

We could see error message like above in estimateGas. The reverted message could be deserialize to Failop with more concrete message. We should provide that to user with better experience.

@zsluedem zsluedem force-pushed the improve-json-rpc-error branch 5 times, most recently from f745ee7 to f896b36 Compare October 8, 2023 07:48
Copy link
Member

@Vid201 Vid201 left a comment

Choose a reason for hiding this comment

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

LGTM!

@zsluedem zsluedem merged commit 502194d into silius-rs:main Oct 9, 2023
2 checks passed
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.

2 participants