Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/googleapiclient/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/googleapiclient/__pycache__/errors.cpython-38.pyc
U

P��gT�@sdZddlmZdZddlZddlmZGdd�de�Z	Gdd	�d	e	�Z
Gd
d�de	�ZGdd
�d
e	�ZGdd�de	�Z
Gdd�de	�ZGdd�de	�ZGdd�de	�ZGdd�de
�ZGdd�de	�ZGdd�de	�ZGdd�de
�ZGdd�de	�ZGd d!�d!e	�ZdS)"z_Errors for the library.

All exceptions defined by the library
should be defined in this file.
�)�absolute_importz$jcgregorio@google.com (Joe Gregorio)N)�_helpersc@seZdZdZdS)�ErrorzBase error for this module.N��__name__�
__module__�__qualname__�__doc__�r
r
�C/opt/cppython/lib/python3.8/site-packages/googleapiclient/errors.pyrsrc@sDeZdZdZe�d�ddd��Zedd��Zdd	�Z	d
d�Z
e
ZdS)
�	HttpErrorz$HTTP data was invalid or unexpected.�NcCs8||_t|t�std��||_||_d|_|��|_dS)NzHTTP content should be bytes�)	�resp�
isinstance�bytes�	TypeError�content�uri�
error_details�_get_reason�reason)�selfrrrr
r
r�__init__&s
zHttpError.__init__cCs|jjS)z6Return the HTTP status code from the response content.)r�status�rr
r
r�status_code0szHttpError.status_codec
s|jj}z�zt�|j�d���Wn"tjk
rB|j�d��YnXt�t�r��dd}t	�fdd�dD�d�}|r҈d||_
nLt�t�r�t��dkr̈d}|dd}d	|dkr�|dd	|_
n�|_
Wnt
ttfk
r�YnX|d
kr�d}|��S)z=Calculate the reason for the error from the response content.zutf-8�error�messagec3s|]}|�dkr|VqdS)rNr
)�.0�kw��datar
r�	<genexpr>As�z(HttpError._get_reason.<locals>.<genexpr>)�detail�details�errorsrrrr%N)rr�json�loadsr�decode�JSONDecodeErrorr�dict�nextr�list�len�
ValueError�KeyErrorr�strip)rrZerror_detail_keywordZfirst_errorr
r!rr5s6

��
zHttpError._get_reasoncCsR|jr d|jj|j|j|jfS|jr<d|jj|j|jfSd|jj|jfSdS)Nz><HttpError %s when requesting %s returned "%s". Details: "%s">z/<HttpError %s when requesting %s returned "%s">z<HttpError %s "%s">)rrrrrrr
r
r�__repr__Ws��zHttpError.__repr__)N)rrrr	�util�
positionalr�propertyrrr2�__str__r
r
r
rr#s	
"rc@seZdZdZdS)�InvalidJsonErrorz&The JSON returned could not be parsed.Nrr
r
r
rr7ksr7c@seZdZdZdS)�UnknownFileTypez File type unknown or unexpected.Nrr
r
r
rr8qsr8c@seZdZdZdS)�UnknownLinkTypez Link type unknown or unexpected.Nrr
r
r
rr9wsr9c@seZdZdZdS)�UnknownApiNameOrVersionz)No API with that name and version exists.Nrr
r
r
rr:}sr:c@seZdZdZdS)�UnacceptableMimeTypeErrorz4That is an unacceptable mimetype for this operation.Nrr
r
r
rr;�sr;c@seZdZdZdS)�MediaUploadSizeErrorz+Media is larger than the method can accept.Nrr
r
r
rr<�sr<c@seZdZdZdS)�ResumableUploadErrorz'Error occurred during resumable upload.Nrr
r
r
rr=�sr=c@seZdZdZdS)�InvalidChunkSizeErrorz!The given chunksize is not valid.Nrr
r
r
rr>�sr>c@seZdZdZdS)�InvalidNotificationErrorz$The channel Notification is invalid.Nrr
r
r
rr?�sr?c@s0eZdZdZe�d�ddd��Zdd�ZeZdS)	�
BatchErrorz'Error occurred during batch operations.�NcCs||_||_||_dS)N)rrr)rrrrr
r
rr�szBatchError.__init__cCs2t|jdd�dkrd|jSd|jj|jfSdS)Nrz<BatchError "%s">z<BatchError %s "%s">)�getattrrrrrr
r
rr2�s
zBatchError.__repr__)NN)	rrrr	r3r4rr2r6r
r
r
rr@�s
r@cs,eZdZdZe�d�d�fdd�	�Z�ZS)�UnexpectedMethodErrorz;Exception raised by RequestMockBuilder on unexpected calls.�Ncstt|��d|�dS)�)Constructor for an UnexpectedMethodError.zReceived unexpected call %sN)�superrCr)rZmethodId��	__class__r
rr�s
�zUnexpectedMethodError.__init__)N)rrrr	r3r4r�
__classcell__r
r
rGrrC�srCcs eZdZdZ�fdd�Z�ZS)�UnexpectedBodyErrorz<Exception raised by RequestMockBuilder on unexpected bodies.cstt|��d||f�dS)rEzExpected: [%s] - Provided: [%s]N)rFrJr)r�expected�providedrGr
rr�s

�zUnexpectedBodyError.__init__)rrrr	rrIr
r
rGrrJ�srJ)r	�
__future__r�
__author__r'Zgoogleapiclientrr3�	Exceptionrrr7r8r9r:r;r<r=r>r?r@rCrJr
r
r
r�<module>s$H

F1le Man4ger