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
httpx.get("https://www.google.com", timeout=0.0000001) raises: httpx.ConnectError: [Errno 65] No route to host
(NOT a sub-class of TimeoutException)
httpx.get("https://www.google.com", timeout=0.05) raises: httpx.ConnectTimeout: _ssl.c:983: The handshake operation timed out
(a sub-class of TimeoutException)
httpx.get("https://www.google.com", timeout=0.015) raises: httpx.ReadTimeout: The read operation timed out
(a sub-class of TimeoutException)
Your mileage may vary depends on the latency between your location and the Google server.
I think ideally all timeouts of operation should raise a consistent exception (sub-class of TimeoutException) from the httpx client.
This discussion was converted from issue #3017 on December 21, 2023 19:46.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
httpx.get("https://www.google.com", timeout=0.0000001)
raises:httpx.ConnectError: [Errno 65] No route to host
(NOT a sub-class of
TimeoutException
)httpx.get("https://www.google.com", timeout=0.05)
raises:httpx.ConnectTimeout: _ssl.c:983: The handshake operation timed out
(a sub-class of
TimeoutException
)httpx.get("https://www.google.com", timeout=0.015)
raises:httpx.ReadTimeout: The read operation timed out
(a sub-class of
TimeoutException
)Your mileage may vary depends on the latency between your location and the Google server.
I think ideally all timeouts of operation should raise a consistent exception (sub-class of
TimeoutException
) from thehttpx
client.Beta Was this translation helpful? Give feedback.
All reactions