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

fabioberger commented Nov 19, 2019

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.

@fabioberger fabioberger requested a review from albrow Nov 19, 2019
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
fabioberger added 3 commits Nov 19, 2019
…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 Nov 20, 2019
@albrow albrow self-requested a review Nov 20, 2019
@albrow
albrow approved these changes Nov 20, 2019
@fabioberger fabioberger merged commit 6fc65d5 into development Nov 20, 2019
2 checks passed
2 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
continuous-integration/drone/push Build is passing
Details
@fabioberger fabioberger deleted the fix/swallowedMethodHandlerCrashedErrs branch Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.