You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
importhttpxhttpx.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?
Activity
HenrikOssipoff commentedon Jun 19, 2020
I see now that the
TimeoutExceptionis living inhttpcoresince 0.13.I feel like this should be documented (did I miss it?).
Would it maybe make more sense to wrap these exceptions in
httpxinstead, so that the user doesn't have to worry about the underlying library?johnanthonyowens commentedon Jun 19, 2020
This is covered in #949.
florimondmanca commentedon Jun 20, 2020
Hey,
As mentioned above this is part of a known issue tracked via #949, going to close this as a duplicate.
Thanks