File: //usr/lib/python3/dist-packages/lazr/restfulclient/__pycache__/errors.cpython-310.pyc
o
�3�O� � @ s� d Z eZg d�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d
d� de�Z G dd
� d
e�Z
G dd� de
�ZG dd� de�ZG dd� de�Z
G dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de
�Zdd� Zd S )!zlazr.restfulclient errors.)�
BadRequest�Conflict�ClientError�CredentialsError�CredentialsFileError� HTTPError�MethodNotAllowed�NotFound�PreconditionFailed�RestfulError�
ResponseError�ServerError�Unauthorized�UnexpectedResponseErrorc @ � e Zd ZdZdS )r
z2Base error for the lazr.restfulclient API library.N��__name__�
__module__�__qualname__�__doc__� r r �;/usr/lib/python3/dist-packages/lazr/restfulclient/errors.pyr
( � r
c @ r )r z&Base credentials/authentication error.Nr r r r r r , r r c @ r )r zError in credentials file.Nr r r r r r 0 r r c @ � e Zd ZdZdd� ZdS )r zError in response.c C s t �| � || _|| _d S )N)r
�__init__�response�content)�selfr r r r r r 7 s
zResponseError.__init__N)r r r r r r r r r r 4 � r c @ r )r z$An unexpected response was received.c C s d| j j| j jf S )N�%s: %s)r �status�reason)r r r r �__str__@ s zUnexpectedResponseError.__str__N�r r r r r! r r r r r = r r c @ r )r z+An HTTP non-2xx response code was received.c C s8 d� dd� t| j�� �D ��}d| jj| jj|| jf S )z9Show the error code, response headers, and response body.�
c S s g | ]}d | �qS )r r )�.0�pairr r r �
<listcomp>I s �z%HTTPError.__str__.<locals>.<listcomp>zIHTTP Error %s: %s
Response headers:
---
%s
---
Response body:
---
%s
---
)�join�sortedr �itemsr r r )r �headersr r r r! G s
���zHTTPError.__str__Nr"