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

TimeoutException missing from package #1029

Closed
2 tasks done
HenrikOssipoff opened this issue Jun 18, 2020 · 3 comments
Closed
2 tasks done

TimeoutException missing from package #1029

HenrikOssipoff opened this issue Jun 18, 2020 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@HenrikOssipoff
Copy link

Checklist

  • The bug is reproducible against the latest release and/or master.
  • There are no similar issues or pull requests to fix it yet.

Describe the bug

According to the documentation, there should be an httpx.TimeoutException class that you can catch if you want to catch any timeout related exception. However, such exception doesn't exist.

To reproduce

import httpx
httpx.TimeoutException

Additional context

I'm assuming it's intended behaviour, and it's a case of the docs not being updated when introducing httpcore over urllib3. However, I'm unsure about what the correct approach now is; should one catch HTTPError instead, or are we forced to catch each individual timeout related exception?

@HenrikOssipoff
Copy link
Author

I see now that the TimeoutException is living in httpcore since 0.13.
I feel like this should be documented (did I miss it?).

Would it maybe make more sense to wrap these exceptions in httpx instead, so that the user doesn't have to worry about the underlying library?

@johnanthonyowens
Copy link

This is covered in #949.

@florimondmanca
Copy link
Member

Hey,

As mentioned above this is part of a known issue tracked via #949, going to close this as a duplicate.

Thanks

@florimondmanca florimondmanca added the duplicate This issue or pull request already exists label Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants