HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //proc/722141/root/lib/python3.6/site-packages/awscli/__pycache__/errorhandler.cpython-36.opt-1.pyc
3

�T_��@sVddlZeje�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd	�d	e�Z	dS)
�Ncs eZdZdZ�fdd�Z�ZS)�BaseOperationErrorziA {error_type} error ({error_code}) occurred when calling the {operation_name} operation: {error_message}csF|jj||||d�}tt|�j|�||_||_||_||_||_	dS)N)�
error_code�
error_message�
error_type�operation_name)
�MSG_TEMPLATE�format�superr�__init__rrrr�http_status_code)�selfrrrrr�msg)�	__class__��"/usr/lib/python3.6/errorhandler.pyr
s
zBaseOperationError.__init__)�__name__�
__module__�__qualname__rr
�
__classcell__rr)rrrsrc@seZdZdS)�ClientErrorN)rrrrrrrr$src@seZdZdS)�ServerErrorN)rrrrrrrr(src@s eZdZdZdd�Zdd�ZdS)�ErrorHandlera�
    This class is responsible for handling any HTTP errors that occur
    when a service operation is called.  It is registered for the
    ``after-call`` event and will have the opportunity to inspect
    all operation calls.  If the HTTP response contains an error
    ``status_code`` an appropriate error message will be printed and
    the handler will short-circuit all further processing by exiting
    with an appropriate error code.
    c	Ksvtjd|j�d}d}|jdkr*d}t}n|jdks>|jdkrFd}t}|dk	rr|j|�\}}|||||j|jd��dS)NzHTTP Response Code: %di�Zserveri�i-Zclient)rrrrr)�LOG�debugZstatus_coderr�_get_error_code_and_message�name)	rZ
http_responseZparsedZmodel�kwargsrZerror_class�code�messagerrr�__call__7s
zErrorHandler.__call__cCs8d}d}d|kr0|d}|jd|�|jd|�fS||fS)NZUnknown�ErrorZCodeZMessage)�get)rZresponserr�errorrrrrHsz(ErrorHandler._get_error_code_and_messageN)rrr�__doc__rrrrrrr,s	r)
ZloggingZ	getLoggerrr�	Exceptionrrr�objectrrrrr�<module>
s