sagebind / isahc

The practical HTTP client that is fun to use.
https://docs.rs/isahc
MIT License
707 stars 62 forks source link

Expose connection info in errors #337

Closed sagebind closed 3 years ago

sagebind commented 3 years ago

Add local_addr and remote_addr to Error which expose the local and remote network addresses of the last used connection for a request before the error occurred, if known.

Fixes #336.

codecov[bot] commented 3 years ago

Codecov Report

Merging #337 (897b25d) into master (8ba69f4) will increase coverage by 0.25%. The diff coverage is 90.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
+ Coverage   74.80%   75.05%   +0.25%     
==========================================
  Files          58       58              
  Lines        3131     3179      +48     
==========================================
+ Hits         2342     2386      +44     
- Misses        789      793       +4     
Impacted Files Coverage Δ
src/response.rs 60.52% <50.00%> (ø)
src/redirect.rs 70.58% <75.00%> (-0.50%) :arrow_down:
src/error.rs 50.85% <86.95%> (+6.12%) :arrow_up:
src/handler.rs 73.39% <100.00%> (+0.94%) :arrow_up:
tests/net.rs 92.42% <100.00%> (+1.51%) :arrow_up:
tests/redirects.rs 100.00% <100.00%> (ø)
src/client.rs 72.92% <0.00%> (-0.17%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8ba69f4...897b25d. Read the comment docs.