U lf@sdZddlmZddlmZGdddeZGdddeZ Gd d d e eZGd d d eZGd ddeZ Gddde Z Gddde Z GdddeZ Gddde e ZGddde ZGdddeZGdddeZGdddeeZGdd d eeZGd!d"d"eeZGd#d$d$eeZGd%d&d&eZGd'd(d(eZGd)d*d*eeZGd+d,d,eeZGd-d.d.eZGd/d0d0eZGd1d2d2eZGd3d4d4ee Z!Gd5d6d6eZ"d7S)8z` requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. ) HTTPError)JSONDecodeErrorcs eZdZdZfddZZS)RequestExceptionzTThere was an ambiguous exception that occurred while handling your request. csT|dd}||_|dd|_|dk rB|jsBt|drB|jj|_tj||dS)zBInitialize RequestException with `request` and `response` objects.responseNrequest)poprrhasattrsuper__init__)selfargskwargsr __class__A/opt/hc_python/lib/python3.8/site-packages/requests/exceptions.pyr s   zRequestException.__init__)__name__ __module__ __qualname____doc__r __classcell__rrrrr src@seZdZdZdS)InvalidJSONErrorzA JSON error occurred.Nrrrrrrrrrsrc@s eZdZdZddZddZdS)rz"Couldn't decode the text into jsoncOs(tj|f|tj|f|j|dS)a Construct the JSONDecodeError instance first with all args. Then use it's args to construct the IOError so that the json specific args aren't used as IOError specific args and the error message from JSONDecodeError is preserved. N)CompatJSONDecodeErrorr rr )r r rrrrr "szJSONDecodeError.__init__cCs t|S)aa The __reduce__ method called when pickling the object must be the one from the JSONDecodeError (be it json/simplejson) as it expects all the arguments for instantiation, not just one like the IOError, and the MRO would by default call the __reduce__ method from the IOError due to the inheritance order. )r __reduce__)r rrrr,szJSONDecodeError.__reduce__N)rrrrr rrrrrrs rc@seZdZdZdS)rzAn HTTP error occurred.Nrrrrrr7src@seZdZdZdS)ConnectionErrorzA Connection error occurred.Nrrrrrr;src@seZdZdZdS) ProxyErrorzA proxy error occurred.Nrrrrrr?src@seZdZdZdS)SSLErrorzAn SSL error occurred.NrrrrrrCsrc@seZdZdZdS)TimeoutzThe request timed out. Catching this error will catch both :exc:`~requests.exceptions.ConnectTimeout` and :exc:`~requests.exceptions.ReadTimeout` errors. NrrrrrrGsrc@seZdZdZdS)ConnectTimeoutzThe request timed out while trying to connect to the remote server. Requests that produced this error are safe to retry. Nrrrrrr Psr c@seZdZdZdS) ReadTimeoutz@The server did not send any data in the allotted amount of time.Nrrrrrr!Wsr!c@seZdZdZdS) URLRequiredz*A valid URL is required to make a request.Nrrrrrr"[sr"c@seZdZdZdS)TooManyRedirectszToo many redirects.Nrrrrrr#_sr#c@seZdZdZdS) MissingSchemaz/The URL scheme (e.g. http or https) is missing.Nrrrrrr$csr$c@seZdZdZdS) InvalidSchemaz9The URL scheme provided is either invalid or unsupported.Nrrrrrr%gsr%c@seZdZdZdS) InvalidURLz%The URL provided was somehow invalid.Nrrrrrr&ksr&c@seZdZdZdS) InvalidHeaderz.The header value provided was somehow invalid.Nrrrrrr'osr'c@seZdZdZdS)InvalidProxyURLz"The proxy URL provided is invalid.Nrrrrrr(ssr(c@seZdZdZdS)ChunkedEncodingErrorz?The server declared chunked encoding but sent an invalid chunk.Nrrrrrr)wsr)c@seZdZdZdS)ContentDecodingErrorz"Failed to decode response content.Nrrrrrr*{sr*c@seZdZdZdS)StreamConsumedErrorz3The content for this response was already consumed.Nrrrrrr+sr+c@seZdZdZdS) RetryErrorzCustom retries logic failedNrrrrrr,sr,c@seZdZdZdS)UnrewindableBodyErrorz;Requests encountered an error when trying to rewind a body.Nrrrrrr-sr-c@seZdZdZdS)RequestsWarningzBase warning for Requests.Nrrrrrr.sr.c@seZdZdZdS)FileModeWarningzJA file was opened in text mode, but Requests determined its binary length.Nrrrrrr/sr/c@seZdZdZdS)RequestsDependencyWarningz@An imported dependency doesn't match the expected version range.Nrrrrrr0sr0N)#rZurllib3.exceptionsr BaseHTTPErrorcompatrrIOErrorrrrrrrr r!r"r# ValueErrorr$r%r&r'r(r)r* TypeErrorr+r,r-Warningr.DeprecationWarningr/r0rrrrs6