exceptions.py
This file
Path
httpcore/exceptions.py
116 lines · 1.9 KiB · Python
Last changed by
Updating docstringsTom Christiebefore adoption5f8000f
History of this fileTake it
Rejig test and tighten up models APITom Christiebefore adoptiondea4d42
lines 1–3why, one step back1# Timeout exceptions...23StuffTom Christiebefore adoption30530d4
lines 4–21why, one step back4class Timeout(Exception):5 """6 A base class for all timeouts.7 """8910class ConnectTimeout(Timeout):11 """12 Timeout while establishing a connection.13 """141516class ReadTimeout(Timeout):17 """18 Timeout while reading response data.19 """2021Merge pull request #23 from encode/adaptersTom Christiebefore adoption696c054
lines 22–27why, one step back22class WriteTimeout(Timeout):23 """24 Timeout while writing request data.25 """2627StuffTom Christiebefore adoption30530d4
lines 28–33why, one step back28class PoolTimeout(Timeout):29 """30 Timeout while waiting to acquire a connection from the pool.31 """3233Rejig test and tighten up models APITom Christiebefore adoptiondea4d42
lines 34–42why, one step back34# HTTP exceptions...353637class ProtocolError(Exception):38 """39 Malformed HTTP.40 """4142Updating docstringsTom Christiebefore adoption5f8000f
lines 43–48why, one step back43class DecodingError(Exception):44 """45 Decoding of the response failed.46 """4748Rejig test and tighten up models APITom Christiebefore adoptiondea4d42
lines 49–51why, one step back49# Redirect exceptions...5051Merge pull request #23 from encode/adaptersTom Christiebefore adoption696c054
lines 52–76why, one step back52class RedirectError(Exception):53 """54 Base class for HTTP redirect errors.55 """565758class TooManyRedirects(RedirectError):59 """60 Too many redirects.61 """626364class RedirectBodyUnavailable(RedirectError):65 """66 Got a redirect response, but the request body was streaming, and is67 no longer available.68 """697071class RedirectLoop(RedirectError):72 """73 Infinite redirect loop.74 """7576Updating docstringsTom Christiebefore adoption5f8000f
line 77why, one step back77# Stream exceptions...StuffTom Christiebefore adoption30530d4
lines 78–79why, one step back7879Updating docstringsTom Christiebefore adoption5f8000f
line 80why, one step back80class StreamException(Exception):StuffTom Christiebefore adoption30530d4
line 81why, one step back81 """Updating docstringsTom Christiebefore adoption5f8000f
lines 82–90why, one step back82 The base class for stream exceptions.8384 The developer made an error in accessing the request stream in85 an invalid way.86 """878889class StreamConsumed(StreamException):90 """StuffTom Christiebefore adoption30530d4
lines 91–95why, one step back91 Attempted to read or stream response content, but the content has already92 been streamed.93 """9495Updating docstringsTom Christiebefore adoption5f8000f
line 96why, one step back96class ResponseNotRead(StreamException):Response.contentTom Christiebefore adoption4c55113
lines 97–102why, one step back97 """98 Attempted to access response content, without having called `read()`99 after a streaming response.100 """101102Updating docstringsTom Christiebefore adoption5f8000f
line 103why, one step back103class ResponseClosed(StreamException):StuffTom Christiebefore adoption30530d4
lines 104–105why, one step back104 """105 Attempted to read or stream response content, but the request has beenUpdating docstringsTom Christiebefore adoption5f8000f
line 106why, one step back106 closed.Merge pull request #20 from yeraydiazdiaz/decoding-exceptionsTom Christiebefore adoption2b134a6
line 107why, one step back107 """Response.contentTom Christiebefore adoption4c55113
lines 108–110why, one step back108109110# Other cases...Merge pull request #20 from yeraydiazdiaz/decoding-exceptionsTom Christiebefore adoption2b134a6
line 111why, one step back111response.next()Tom Christiebefore adoptiond652479
line 112why, one step back112Merge pull request #23 from encode/adaptersTom Christiebefore adoption696c054
lines 113–114why, one step back113class InvalidURL(Exception):114 """Merge pull request #20 from yeraydiazdiaz/decoding-exceptionsTom Christiebefore adoption2b134a6
line 115why, one step back115 URL was missing a hostname, or was not one of HTTP/HTTPS.StuffTom Christiebefore adoption30530d4
line 116why, one step back116 """