HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/awscli/__pycache__/errorhandler.cpython-38.pyc
U

<�^��@sVddlZe�e�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|��|�||_||_||_||_||_	dS)N)�
error_code�
error_message�
error_type�operation_name)
�MSG_TEMPLATE�format�superr�__init__rrrr�http_status_code)�selfrrrrr�msg��	__class__��5/usr/lib/python3/dist-packages/awscli/errorhandler.pyr
s�zBaseOperationError.__init__)�__name__�
__module__�__qualname__rr
�
__classcell__rrrrrsrc@seZdZdS)�ClientErrorN�rrrrrrrr$src@seZdZdS)�ServerErrorNrrrrrr(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	Ksvt�d|j�d}d}|jdkr*d}t}n|jdks>|jdkrFd}t}|dk	rr|�|�\}}|||||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}|�d|�|�d|�fS||fS)NZUnknown�ErrorZCodeZMessage)�get)rZresponserr �errorrrrrHsz(ErrorHandler._get_error_code_and_messageN)rrr�__doc__r!rrrrrr,s
r)
ZloggingZ	getLoggerrr�	Exceptionrrr�objectrrrrr�<module>
s