Skip to content

is_transport_error

Function: warmhub.is_transport_error

is_transport_error(error: object)

Whether error came from the transport rather than from the backend.

True for the whole httpx.TransportError tree, timeouts included. The distinction that matters is response-or-no-response: anything raised before a complete response existed is NETWORK, and only a response the backend actually produced can be BACKEND. Calling a ReadError BACKEND claims the server answered when it did not, and diverges from TypeScript, where every one of these is a rejected fetch.