VY @sdZddlmZGdddeZGdddeZGdddeZGd d d eZGd d d eZGd ddeZ Gdddee Z Gddde Z GdddeZ GdddeZ GdddeeZGdddeeZGdddeeZGdddeeZGdd d eZGd!d"d"eeZGd#d$d$eeZGd%d&d&eZGd'd(d(eZGd)d*d*eZGd+d,d,eeZd-S).z` requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. ) HTTPErrorcs(eZdZdZfddZS)RequestExceptionzTThere was an ambiguous exception that occurred while handling your request. cs|jdd}||_|jdd|_|dk rd|j rdt|drd|jj|_tt|j||dS)zBInitialize RequestException with `request` and `response` objects.responseNrequest)poprrhasattrsuperr__init__)selfargskwargsr) __class__7/tmp/pip-build-04bmskau/requests/requests/exceptions.pyr s zRequestException.__init__)__name__ __module__ __qualname____doc__r rr)r rr s rc@seZdZdZdS)rzAn HTTP error occurred.N)rrrrrrrrrs rc@seZdZdZdS)ConnectionErrorzA Connection error occurred.N)rrrrrrrrr s rc@seZdZdZdS) ProxyErrorzA proxy error occurred.N)rrrrrrrrr$s rc@seZdZdZdS)SSLErrorzAn SSL error occurred.N)rrrrrrrrr(s rc@seZdZdZdS)TimeoutzThe request timed out. Catching this error will catch both :exc:`~requests.exceptions.ConnectTimeout` and :exc:`~requests.exceptions.ReadTimeout` errors. N)rrrrrrrrr,s rc@seZdZdZdS)ConnectTimeoutzThe request timed out while trying to connect to the remote server. Requests that produced this error are safe to retry. N)rrrrrrrrr5s rc@seZdZdZdS) ReadTimeoutz@The server did not send any data in the allotted amount of time.N)rrrrrrrrr<s rc@seZdZdZdS) URLRequiredz*A valid URL is required to make a request.N)rrrrrrrrr@s rc@seZdZdZdS)TooManyRedirectszToo many redirects.N)rrrrrrrrrDs rc@seZdZdZdS) MissingSchemaz/The URL schema (e.g. http or https) is missing.N)rrrrrrrrrHs rc@seZdZdZdS) InvalidSchemaz"See defaults.py for valid schemas.N)rrrrrrrrrLs rc@seZdZdZdS) InvalidURLz%The URL provided was somehow invalid.N)rrrrrrrrrPs rc@seZdZdZdS) InvalidHeaderz.The header value provided was somehow invalid.N)rrrrrrrrrTs rc@seZdZdZdS)ChunkedEncodingErrorz?The server declared chunked encoding but sent an invalid chunk.N)rrrrrrrrr Xs r c@seZdZdZdS)ContentDecodingErrorz!Failed to decode response contentN)rrrrrrrrr!\s r!c@seZdZdZdS)StreamConsumedErrorz2The content for this response was already consumedN)rrrrrrrrr"`s r"c@seZdZdZdS) RetryErrorzCustom retries logic failedN)rrrrrrrrr#ds r#c@seZdZdZdS)UnrewindableBodyErrorz:Requests encountered an error when trying to rewind a bodyN)rrrrrrrrr$gs r$c@seZdZdZdS)RequestsWarningzBase warning for Requests.N)rrrrrrrrr%ms r%c@seZdZdZdS)FileModeWarningzJA file was opened in text mode, but Requests determined its binary length.N)rrrrrrrrr&rs r&N)rZpackages.urllib3.exceptionsr BaseHTTPErrorIOErrorrrrrrrrrr ValueErrorrrrrr r! TypeErrorr"r#r$Warningr%DeprecationWarningr&rrrrs,