HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/uaclient/api/__pycache__/errors.cpython-38.pyc
U

��Jh��@s�ddlmZddlmZmZddlmZddlmZddl	m
Z
eed�dd�ZGd	d
�d
e�Z
Gdd�de
�ZGd
d�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZdS)�)�messages)�APIResponse�ErrorWarningObject)�UbuntuProError)�get_pro_environment)�check_for_new_version)�	exception�returnc	Cs�t|ttf�r4t|j|jp$d|jj|jp,id�}ntt	|�d|jjid�}g}t
�}|r�|�ttj
j|d�jtj
jid��tdddddd	�tt����D�ii|g|d
�S)Nzgeneric-)�title�code�meta)�versionZv1ZfailurerZenvironment_varscSsg|]\}}||d��qS))�name�value�)�.0rrrr�5/usr/lib/python3/dist-packages/uaclient/api/errors.py�
<listcomp>)s�zerror_out.<locals>.<listcomp>)Z_schema_version�result�data�errors�warnings)�
isinstancer�APIErrorr�msgZmsg_code�	__class__�__name__Zadditional_info�strr�appendrZWARN_NEW_VERSION_AVAILABLE�formatrr�sortedr�items)r�errorrZnew_versionrrr�	error_outsJ
�
����
����r#c@seZdZdS)rN)r�
__module__�__qualname__rrrrr4src@seZdZejZdS)�APIInvalidEndpointN)rr$r%rZE_API_INVALID_ENDPOINT�_formatted_msgrrrrr&8sr&c@seZdZejZdS)�
APIMissingArgN)rr$r%rZE_API_MISSING_ARGr'rrrrr(<sr(c@seZdZejZdS)�APINoArgsForEndpointN)rr$r%rZE_API_NO_ARG_FOR_ENDPOINTr'rrrrr)@sr)c@seZdZejZdS)�APIJSONDataFormatErrorN)rr$r%rZE_API_JSON_DATA_FORMAT_ERRORr'rrrrr*Dsr*c@seZdZejZdS)�APIBadArgsFormatN)rr$r%rZE_API_BAD_ARGS_FORMATr'rrrrr+Hsr+N)ZuaclientrZuaclient.api.data_typesrrZuaclient.exceptionsrZ
uaclient.utilrZuaclient.versionr�	Exceptionr#rr&r(r)r*r+rrrr�<module>s,