HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/vendors_api/__pycache__/exceptions.cpython-37.pyc
B

ib:rc���@s�dZddlmZddlmZddlmZddlmZGdd�d�ZGdd	�d	e�ZGd
d�de�Z	Gdd
�d
e�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
Gdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de�ZdS)z8
Module contains various exceptions raised by this api.
�)�absolute_import)�division)�print_function)�FormattedExceptionc@s eZdZdZdZdZdZdZdS)�ErrorMessagezL
    Documented constants that can be
    received from vendors scripts
    ZInternalAPIError�PermissionDenied�
BadRequest�NotFoundN)�__name__�
__module__�__qualname__�__doc__ZINTERNAL_ERRORZPERMISSION_DENIEDZBAD_REQUESTZ	NOT_FOUND�rr��/builddir/build/BUILDROOT/alt-python27-cllib-3.4.1-1.el9.cloudlinux.x86_64/opt/alt/python37/lib/python3.7/site-packages/vendors_api/exceptions.pyrs
rcs eZdZdZ�fdd�Z�ZS)�VendorScriptErrorz0
    Any errors related to vendors scripts.
    cstt|��||d��dS)N)�message�context)�superr�__init__)�selfrr)�	__class__rrr!s
zVendorScriptError.__init__)r
rrr
r�
__classcell__rr)rrrsrc@seZdZdZdS)�UnexpectedResultzc
    An error that is raised in case of
    any unexpected results returned by vendors script.
    N)r
rrr
rrrrr(srcs eZdZdZ�fdd�Z�ZS)�MalformedErrorzV
    An error that is raised in case of
    malformed output that we cannot parse
    cstt|�jd|d�dS)NzXvendor api returned invalid response that cannot be parsed with json, output: %(output)s)�output)rrr)rr)rrrr5s
zMalformedError.__init__)r
rrr
rrrr)rrr0src@seZdZdZdS)�BadScriptErrorzY
    An error that is raised when we cannot
    run vendor's script for some reason.
    N)r
rrr
rrrrr=srcs eZdZdZ�fdd�Z�ZS)�NotImplementedByVendorzR
    Raised when we try to start script that is
    not implemented by vendor
    cstt|�jd|d�dS)NzdCommand `%(command)s` is not implemented in integration scripts. Please, implement it and try again.)�command)rrr)rr)rrrrJs
zNotImplementedByVendor.__init__)r
rrr
rrrr)rrrEsrcs eZdZdZ�fdd�Z�ZS)�_VendorApiFailedz9
    Bunch of api errors returned by vendors scripts
    cstt|�j|d�dS)N)r)rrr)rr)rrrrVsz_VendorApiFailed.__init__)r
rrr
rrrr)rrrRsrc@seZdZdZdS)�
InternalErrorz�
    n case when data is temporarily unavailable
    due to internal errors in the integration script
    (database unavailable or something like that)
    N)r
rrr
rrrrrZsrc@seZdZdZdS)rzh
    In case when data is unavailable due to restricted
    access of a user that called the script
    N)r
rrr
rrrrrcsrc@seZdZdZdS)rzQ
    In case when known to be false arguments are passed
    to the utility.
    N)r
rrr
rrrrrksrc@seZdZdZdS)r	ze
    In case when during data filtering the target entity
    doesn't exist in the control panel
    N)r
rrr
rrrrr	ssr	cs eZdZdZ�fdd�Z�ZS)�VendorApiMalformedDataz5
    Raised when vendor script returns bad data.
    cstt|�jd|d�dS)NzwIntegration script returned invalid response which is not accepted by internal schema check. See error below.
%(error)s)�error)rr r)rr!)rrrrs
zVendorApiMalformedData.__init__)r
rrr
rrrr)rrr {sr N)r
Z
__future__rrrZclcommonrrrrrrrrrrrr	r rrrr�<module>
s