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

Map HTTPCore exceptions #1044

Merged
merged 4 commits into from
Jul 3, 2020
Merged

Map HTTPCore exceptions #1044

merged 4 commits into from
Jul 3, 2020

Conversation

florimondmanca
Copy link
Member

Fixes #1023, refs #1029, refs #949

Map any httpcore exceptions to (new) HTTPX-specific exceptions, so that we can guarantee that this kind of usage will catch any exception raised by HTTPX:

try:
    ...
except httpx.HTTPError:
    ...

@florimondmanca florimondmanca requested a review from a team July 2, 2020 17:17
Copy link
Member

@tomchristie tomchristie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic, yup!

@florimondmanca
Copy link
Member Author

#1045 just helped me catch that TimeoutException hadn't been added to httpx.*. ;-)

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.

0.13: some httpcore exceptions are missing from top level package
2 participants