Skip to content
Myr

exceptions.py

This file

Path

httpcore/exceptions.py

42 lines · 750 bytes · Python

Last changed by

Merge pull request #17 from encode/close-keepalive-connectionsTom Christiebefore adoption91a2a1b

History of this file

Take it

StuffTom Christiebefore adoption30530d4

lines 1–24why, one step back
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 """2324

Merge pull request #17 from encode/close-keepalive-connectionsTom Christiebefore adoption91a2a1b

line 25why, one step back
25class ProtocolError(Exception):

StuffTom Christiebefore adoption30530d4

line 26why, one step back
26 """

Merge pull request #17 from encode/close-keepalive-connectionsTom Christiebefore adoption91a2a1b

line 27why, one step back
27 Malformed HTTP.

StuffTom Christiebefore adoption30530d4

lines 28–42why, one step back
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 """