bitcoin-cli: More detailed error reporting #8722

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2016_09_cli_http_error changing 1 files +39 −3
  1. laanwj commented at 1:12 PM on September 14, 2016: member

    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.

  2. laanwj added the label RPC/REST/ZMQ on Sep 14, 2016
  3. jonasschnelli commented at 1:36 PM on September 14, 2016: contributor

    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

  4. laanwj commented at 2:02 PM on September 14, 2016: member

    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.

  5. laanwj force-pushed on Sep 14, 2016
  6. laanwj commented at 4:26 PM on September 14, 2016: member

    I've guarded the uses of evhttp error with LIBEVENT_VERSION_NUMBER >= 0x02010300. This is the version it was introduced in according to git history. On older versions it will always print unknown error.

  7. bitcoin-cli: More detailed error reporting
    Register a evhttp error handler to get a more detailed error message
    if the HTTP request fails.
    381826dfee
  8. laanwj force-pushed on Sep 21, 2016
  9. laanwj commented at 12:17 PM on September 21, 2016: member

    Ok I've slightly tweaked the error messages and rebased. This should be ready to go.

  10. luke-jr approved
  11. luke-jr commented at 8:53 AM on September 22, 2016: member

    utACK

  12. laanwj merged this on Sep 26, 2016
  13. laanwj closed this on Sep 26, 2016

  14. laanwj referenced this in commit bb843adc8d on Sep 26, 2016
  15. zkbot referenced this in commit b0afc4ba1d on Mar 22, 2017
  16. zkbot referenced this in commit f9f48667be on Mar 25, 2017
  17. codablock referenced this in commit dfade488fa on Sep 19, 2017
  18. codablock referenced this in commit 8e610c0ac3 on Jan 11, 2018
  19. andvgal referenced this in commit d260db61bf on Jan 6, 2019
  20. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me