-
Notifications
You must be signed in to change notification settings - Fork 36.2k
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
bitcoin-cli: More detailed error reporting #8722
Conversation
utACK but looks like your are using functions not available in the libevent version travis compiles against (evhttp_request_error) https://travis-ci.org/bitcoin/bitcoin/jobs/159869918#L1081 |
Somehow I was afraid of that, all of the useful stuff in libevent is in the alpha/beta branch these days... deja vu to #7759. |
8157648
to
719ebf1
Compare
I've guarded the uses of evhttp error with |
Register a evhttp error handler to get a more detailed error message if the HTTP request fails.
719ebf1
to
381826d
Compare
Ok I've slightly tweaked the error messages and rebased. This should be ready to go. |
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.
utACK
381826d bitcoin-cli: More detailed error reporting (Wladimir J. van der Laan)
libevent-based http server Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5677 - bitcoin/bitcoin#6695 - bitcoin/bitcoin#6899 - bitcoin/bitcoin#7016 - bitcoin/bitcoin#7964 - bitcoin/bitcoin#8722 - bitcoin/bitcoin#8730 - bitcoin/bitcoin#9073 - bitcoin/bitcoin#9265 - bitcoin/bitcoin#9387 - bitcoin/bitcoin#9471 - bitcoin/bitcoin#9647 - bitcoin/bitcoin#9903 Closes #1593 and #1856.
libevent-based http server Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5677 - bitcoin/bitcoin#6695 - bitcoin/bitcoin#6899 - bitcoin/bitcoin#7016 - bitcoin/bitcoin#7964 - bitcoin/bitcoin#8722 - bitcoin/bitcoin#8730 - bitcoin/bitcoin#9073 - bitcoin/bitcoin#9265 - bitcoin/bitcoin#9387 - bitcoin/bitcoin#9471 - bitcoin/bitcoin#9647 - bitcoin/bitcoin#9903 - bitcoin/bitcoin#6640 - bitcoin/bitcoin#8139 - bitcoin/bitcoin#8839 Closes #1593 and #1856.
381826d bitcoin-cli: More detailed error reporting (Wladimir J. van der Laan)
381826d bitcoin-cli: More detailed error reporting (Wladimir J. van der Laan)
Register a evhttp error handler to get a more detailed error message if the HTTP request fails. This can save a lot of confusion, distinguishing between, say, timeouts and being unable to connect and HTTP header issues.
Only works for libevent >= 2.1.3.
The rationale for this was to be able to debug the
zu
issue leading to #8730. Without this, there is no way to distinguish a refused connection from a HTTP parsing isue.