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

Better DNS error handling #1249

Merged
merged 2 commits into from Dec 23, 2021
Merged

Conversation

isidentical
Copy link
Contributor

@isidentical isidentical commented Dec 22, 2021

E.g

$ http non.existent.url
http: error: gaierror: [Errno -2] Name or service not known
Couldn't resolve the given URL. Perhaps check the URL and try again.

or

http: error: gaierror: [Errno -3] Temporary failure in name resolution
Couldn't connect to a DNS server. Perhaps check your connection and try again.

Fixes #1248

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2021

Codecov Report

Merging #1249 (def9f85) into master (4d7d6b6) will decrease coverage by 0.86%.
The diff coverage is 94.04%.

❗ Current head def9f85 differs from pull request most recent head e4da2fd. Consider uploading reports for the commit e4da2fd to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1249      +/-   ##
==========================================
- Coverage   97.28%   96.42%   -0.87%     
==========================================
  Files          67       82      +15     
  Lines        4235     5593    +1358     
==========================================
+ Hits         4120     5393    +1273     
- Misses        115      200      +85     
Impacted Files Coverage Δ
tests/test_binary.py 100.00% <ø> (ø)
httpie/compat.py 31.11% <27.90%> (-68.89%) ⬇️
httpie/output/lexers/http.py 52.00% <52.00%> (ø)
tests/conftest.py 77.14% <58.33%> (-9.82%) ⬇️
tests/test_ssl.py 91.01% <66.66%> (-3.93%) ⬇️
httpie/output/formatters/colors.py 89.05% <75.60%> (-4.53%) ⬇️
httpie/manager/__main__.py 82.35% <82.35%> (ø)
httpie/models.py 94.73% <83.33%> (-2.64%) ⬇️
httpie/uploads.py 98.68% <83.33%> (-1.32%) ⬇️
httpie/manager/core.py 92.85% <92.85%> (ø)
... and 56 more

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 5a83a9e...e4da2fd. Read the comment docs.

httpie/core.py Outdated Show resolved Hide resolved
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
@jkbrzt jkbrzt merged commit e0e03f3 into httpie:master Dec 23, 2021
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.

Gracefully handle DNS failures
3 participants