plugins_api.exceptions
Plugin-related exceptions.
This module contains all exception classes related to plugin operations.
Attributes
| Name | Description |
|---|---|
SOURCE_ERRORS | Errors that affect the whole source connection. |
Classes
| Name | Description |
|---|---|
AuthenticationError | Exception raised for authentication errors. |
DataIntegrityError | Exception raised for data integrity issues. |
DataInvalidError | Exception raised for invalid data objects. |
DataNotFoundError | Exception raised when a data object is not found. |
DownloadDataError | Exception raised for error during data download. |
HostConnectionRefusedError | Exception raised when the host is reachable but refuses the TCP connection. |
InvalidPluginTypeError | Exception raised for invalid plugin types. |
PluginError | Base class for exceptions related to plugins. |
PluginNotFoundError | Exception raised when a plugin is not found. |
PluginPermissionError | Exception raised for permission errors related to plugins. |
PluginSubmissionError | Exception raised for submission-related errors in plugins. |
SizeLimitExceededError | Exception raised when size or file count limits are exceeded. |
UnreachableError | Exception raised when a host is unreachable. |
SOURCE_ERRORSattributemodule attribute#
SOURCE_ERRORS: tuple[type[PluginError], ...] = (UnreachableError, HostConnectionRefusedError, AuthenticationError)Errors that affect the whole source connection.
In batch reads they must be raised, not stored per id. Shared by
DataPlugin._read_each, madbot core, and plugins that implement a native
batch override.
AuthenticationErrorclass#
class AuthenticationError(*args, **kwargs)Bases: PluginError
Exception raised for authentication errors.
DataIntegrityErrorclass#
class DataIntegrityError(dataobject: str, *args, **kwargs)Bases: PluginError
Exception raised for data integrity issues.
DataInvalidErrorclass#
class DataInvalidError(dataobject: str, *args, **kwargs)Bases: PluginError
Exception raised for invalid data objects.
DataNotFoundErrorclass#
class DataNotFoundError(dataobject: str, *args, **kwargs)Bases: PluginError
Exception raised when a data object is not found.
DownloadDataErrorclass#
class DownloadDataError(reason: str, *args, **kwargs)Bases: PluginError
Exception raised for error during data download.
HostConnectionRefusedErrorclass#
class HostConnectionRefusedError(host: str, *args, **kwargs)Bases: PluginError
Exception raised when the host is reachable but refuses the TCP connection.
Distinct from UnreachableError: the network path to the host works,
but nothing accepted the connection (for example sshd down, wrong port, or
an active reject). Plugins typically map errno.ECONNREFUSED to this.
InvalidPluginTypeErrorclass#
class InvalidPluginTypeError(plugin_type: str, *args, **kwargs)Bases: PluginError
Exception raised for invalid plugin types.
This error is raised when an invalid plugin type is provided for a certain operation. For instance, when trying to retrieve the instance of a plugin that is not a ConnectionPlugin, as only ConnectionPlugins (and its subclasses) are allowed to be instantiated.
PluginErrorclass#
class PluginError(Exception)Bases: Exception
Base class for exceptions related to plugins.
PluginNotFoundErrorclass#
class PluginNotFoundError(plugin: str, *args, **kwargs)Bases: PluginError
Exception raised when a plugin is not found.
PluginPermissionErrorclass#
class PluginPermissionError(reason: str, *args, **kwargs)Bases: PluginError
Exception raised for permission errors related to plugins.
PluginSubmissionErrorclass#
class PluginSubmissionError(reason: str, *args, **kwargs)Bases: PluginError
Exception raised for submission-related errors in plugins.
SizeLimitExceededErrorclass#
class SizeLimitExceededError(reason: str, *args, **kwargs)Bases: PluginError
Exception raised when size or file count limits are exceeded.
UnreachableErrorclass#
class UnreachableError(host: str, *args, **kwargs)Bases: PluginError
Exception raised when a host is unreachable.

