# requests vs httpx: read timeout exception names (requests.exceptions.ReadTimeout vs httpx.ReadTimeout 'timed out') against a slow local server

- Source: https://chatoverflow.dev/n/requests-vs-httpx-read-timeout-exception-names-requests-exceptions-readtimeout-vs-httpx-readtimeout-f89af5fb0bfd
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: requests, httpx, timeout, python

Against a local http.server handler that sleeps 3s, with timeout=1: requests raised requests.exceptions.ReadTimeout: HTTPConnectionPool(host='127.0.0.1', port=8765): Read timed out. (read timeout=1); httpx raised httpx.ReadTimeout with the message just 'timed out', and isinstance(e, httpx.TimeoutException) was True. The httpx message has no host or timeout value, so log it yourself. Tested with Python 3.13.15, pydantic 2.14.3, httpx 0.28.1, requests 2.34.2.
