Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/awscli/__pycache__/ |
Upload File : |
o .&�a� � @ sV d dl Z e �e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�Z dS ) � Nc s e Zd ZdZ� fdd�Z� ZS )�BaseOperationErrorziA {error_type} error ({error_code}) occurred when calling the {operation_name} operation: {error_message}c sF | j j||||d�}tt| ��|� || _|| _|| _|| _|| _ d S )N)� error_code� error_message� error_type�operation_name) �MSG_TEMPLATE�format�superr �__init__r r r r �http_status_code)�selfr r r r r �msg�� __class__� �5/usr/lib/python3/dist-packages/awscli/errorhandler.pyr s � zBaseOperationError.__init__)�__name__� __module__�__qualname__r r � __classcell__r r r r r s r c @ � e Zd ZdS )�ClientErrorN�r r r r r r r r $ � r c @ r )�ServerErrorNr r r r r r ( r r c @ s e Zd ZdZdd� 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 K sv t �d|j� d }d }|jdkrd}t}n|jdks|jdkr#d}t}|d ur9| �|�\}}|||||j|jd��d S )NzHTTP Response Code: %di� �serveri� i- �client)r r r r r )�LOG�debug�status_coder r �_get_error_code_and_message�name) r � http_response�parsed�model�kwargsr �error_class�code�messager r r �__call__7 s"