exceptions.py
This file
Path
httpcore/exceptions.py
66 lines · 1.1 KiB · Python
Last changed by
Wrap decoding errors with custom exceptionsYeray Diaz Diazbefore adoptionbdc218f
History of this fileTake it
1class Timeout(Exception):2 """3 A base class for all timeouts.4 """567class ConnectTimeout(Timeout):8 """9 Timeout while establishing a connection.10 """111213class ReadTimeout(Timeout):14 """15 Timeout while reading response data.16 """171819class PoolTimeout(Timeout):20 """21 Timeout while waiting to acquire a connection from the pool.22 """232425class ProtocolError(Exception):26 """27 Malformed HTTP.28 """293031class StreamConsumed(Exception):32 """33 Attempted to read or stream response content, but the content has already34 been streamed.35 """363738class ResponseClosed(Exception):39 """40 Attempted to read or stream response content, but the request has been41 closed without loading the body.42 """434445class DecodingError(Exception):46 """47 Decoding of the response failed.48 """495051class DeflateDecodingError(DecodingError):52 """53 Decoding of the response using deflate failed.54 """555657class GzipDecodingError(DecodingError):58 """59 Decoding of the response using gzip failed.60 """616263class BrotliDecodingError(DecodingError):64 """65 Decoding of the response using brotli failed.66 """