Skip to content
Myr

exceptions.py

This file

Path

httpcore/exceptions.py

85 lines · 1.4 KiB · Python

Last changed by

response.next()Tom Christiebefore adoptiond652479

History of this file

Take it

StuffTom Christiebefore adoption30530d4

lines 1–18why, 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 """1718

Merge pull request #23 from encode/adaptersTom Christiebefore adoption696c054

lines 19–24why, one step back
19class WriteTimeout(Timeout):
20 """21 Timeout while writing request data.22 """2324

StuffTom Christiebefore adoption30530d4

lines 25–30why, one step back
25class PoolTimeout(Timeout):
26 """27 Timeout while waiting to acquire a connection from the pool.28 """2930

Merge pull request #23 from encode/adaptersTom Christiebefore adoption696c054

lines 31–55why, one step back
31class RedirectError(Exception):
32 """33 Base class for HTTP redirect errors.34 """353637class TooManyRedirects(RedirectError):38 """39 Too many redirects.40 """414243class RedirectBodyUnavailable(RedirectError):44 """45 Got a redirect response, but the request body was streaming, and is46 no longer available.47 """484950class RedirectLoop(RedirectError):51 """52 Infinite redirect loop.53 """5455

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

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

StuffTom Christiebefore adoption30530d4

line 57why, one step back
57 """

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

line 58why, one step back
58 Malformed HTTP.

StuffTom Christiebefore adoption30530d4

lines 59–72why, one step back
59 """
606162class StreamConsumed(Exception):63 """64 Attempted to read or stream response content, but the content has already65 been streamed.66 """676869class ResponseClosed(Exception):70 """71 Attempted to read or stream response content, but the request has been72 closed without loading the body.

Merge pull request #23 from encode/adaptersTom Christiebefore adoption696c054

lines 73–75why, one step back
73 """
7475

Merge pull request #20 from yeraydiazdiaz/decoding-exceptionsTom Christiebefore adoption2b134a6

lines 76–80why, one step back
76class DecodingError(Exception):
77 """78 Decoding of the response failed.79 """80

response.next()Tom Christiebefore adoptiond652479

line 81why, one step back
81

Merge pull request #23 from encode/adaptersTom Christiebefore adoption696c054

lines 82–83why, one step back
82class InvalidURL(Exception):
83 """

Merge pull request #20 from yeraydiazdiaz/decoding-exceptionsTom Christiebefore adoption2b134a6

line 84why, one step back
84 URL was missing a hostname, or was not one of HTTP/HTTPS.

StuffTom Christiebefore adoption30530d4

line 85why, one step back
85 """