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

rpc: log errors when RPC method panics #545

Merged
merged 3 commits into from
Nov 20, 2019

Conversation

fabioberger
Copy link
Contributor

Until now, if an RPC request caused a panic, the panic was caught by the go-ethereum rpc library and a non-descript method handler crashed error message was returned to the caller. In order to log a helpful error message, including the stack trace of where the panic originated from, this PR adds panic recovery to all methods in RPCHandler.

cmd/mesh/rpc_handler.go Outdated Show resolved Hide resolved
cmd/mesh/rpc_handler.go Outdated Show resolved Hide resolved
cmd/mesh/rpc_handler.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
…ck trace before returning a more helpful error message to the call then the default recover in go-ethereum
@fabioberger fabioberger force-pushed the fix/swallowedMethodHandlerCrashedErrs branch from 0191dff to 3816c7d Compare November 20, 2019 10:57
@albrow albrow self-requested a review November 20, 2019 17:34
@fabioberger fabioberger merged commit 6fc65d5 into development Nov 20, 2019
@fabioberger fabioberger deleted the fix/swallowedMethodHandlerCrashedErrs branch November 20, 2019 17:35
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