REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 3.01 KB
Close
/opt/cloudlinux/venv/lib64/python3.11/site-packages/vendors_api/exceptions.py
Text
Base64
# coding=utf-8 # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2021 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENCE.TXT # """ Module contains various exceptions raised by this api. """ from clcommon import FormattedException class ErrorMessage: """ Documented constants that can be received from vendors scripts """ INTERNAL_ERROR = "InternalAPIError" PERMISSION_DENIED = "PermissionDenied" BAD_REQUEST = "BadRequest" NOT_FOUND = "NotFound" class VendorScriptError(FormattedException): """ Any errors related to vendors scripts. """ def __init__(self, message, **context): super().__init__({ 'message': message, 'context': context }) class UnexpectedResult(VendorScriptError): """ An error that is raised in case of any unexpected results returned by vendors script. """ pass class MalformedError(VendorScriptError): """ An error that is raised in case of malformed output that we cannot parse """ def __init__(self, output): super().__init__( 'vendor api returned invalid response that ' 'cannot be parsed with json, output: %(output)s', output=output ) class BadScriptError(VendorScriptError): """ An error that is raised when we cannot run vendor's script for some reason. """ pass class NotImplementedByVendor(VendorScriptError): """ Raised when we try to start script that is not implemented by vendor """ def __init__(self, command): super().__init__( "Command `%(command)s` is not implemented " "in integration scripts. Please, implement it and try again.", command=command ) class _VendorApiFailed(VendorScriptError): """ Bunch of api errors returned by vendors scripts """ def __init__(self, message): super().__init__(message=message) class InternalError(_VendorApiFailed): """ n case when data is temporarily unavailable due to internal errors in the integration script (database unavailable or something like that) """ pass class PermissionDenied(_VendorApiFailed): """ In case when data is unavailable due to restricted access of a user that called the script """ pass class BadRequest(_VendorApiFailed): """ In case when known to be false arguments are passed to the utility. """ pass class NotFound(_VendorApiFailed): """ In case when during data filtering the target entity doesn't exist in the control panel """ pass class VendorApiMalformedData(VendorScriptError): """ Raised when vendor script returns bad data. """ def __init__(self, error): super().__init__( "Integration script returned invalid response " "which is not accepted by internal schema check. See error below.\n" "%(error)s", error=error )
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
schemas
DIR
-
drwxr-xr-x
2026-03-14 07:01:45
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-03-14 07:01:45
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
config.py
2.52 KB
lrw-r--r--
2026-02-10 15:06:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
exceptions.py
3.01 KB
lrw-r--r--
2026-02-10 15:06:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
models.py
7.38 KB
lrw-r--r--
2026-02-10 15:06:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
parser.py
13.48 KB
lrw-r--r--
2026-02-10 15:06:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Readme.md
4.13 KB
lrw-r--r--
2026-02-10 15:06:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
413 B
lrw-r--r--
2026-02-10 15:06:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).