Skip to content
Myr

Update compatibility.md with documentation of exceptions differences (#3649)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Glen Keane · committed by GitHub · parent 767cf6b · Browse files · 1 file+4 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Kim Christie <tom@tomchristie.com>

Diff stats

1 file+4 added−0 removed

  • other:+4 added−0 removed

1 file+4 added−0 removed

modified:docs/compatibility.md+4 added
224 unmodified lines
225226In HTTPX, event hooks may access properties of requests and responses, but event hook callbacks cannot mutate the original request/response.227228If you are looking for more control, consider checking out [Custom Transports](advanced/transports.md#custom-transports).229230## Exceptions and Errors231232`requests` exception hierarchy is slightly different to the `httpx` exception hierarchy. `requests` exposes a top level `RequestException`, where as `httpx` exposes a top level `HTTPError`. see the exceptions exposes in requests [here](https://requests.readthedocs.io/en/latest/_modules/requests/exceptions/). See the `httpx` error hierarchy [here](https://www.python-httpx.org/exceptions/).