Skip to content

Commit bc00d2b

Browse files
Update compatibility.md with documentation of exceptions differences (#3649)
Co-authored-by: Kim Christie <[email protected]>
1 parent 767cf6b commit bc00d2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/compatibility.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,7 @@ For both query params (`params=`) and form data (`data=`), `requests` supports s
226226
In HTTPX, event hooks may access properties of requests and responses, but event hook callbacks cannot mutate the original request/response.
227227

228228
If you are looking for more control, consider checking out [Custom Transports](advanced/transports.md#custom-transports).
229+
230+
## Exceptions and Errors
231+
232+
`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/).

0 commit comments

Comments
 (0)