"""This modules defines all kinds of exceptions raised in Jina."""
from jina.helper import deprecated_method
[docs]class BaseJinaException(BaseException):
"""A base class for all exceptions raised by Jina"""
@deprecated_method('BaseJinaException')
class BaseJinaExeception(BaseException):
"""A base class for all exceptions raised by Jina"""
[docs]class ExecutorFailToLoad(SystemError, BaseJinaException):
"""When the executor can not be loaded in pod/deployment."""
[docs]class RuntimeFailToStart(SystemError, BaseJinaException):
"""When pod/deployment is failed to started."""
[docs]class ScalingFails(SystemError, BaseJinaException):
"""When scaling is unsuccessful for an Executor."""
[docs]class RuntimeTerminated(KeyboardInterrupt, BaseJinaException):
"""The event loop of BasePod ends."""
[docs]class FlowTopologyError(Exception, BaseJinaException):
"""Flow exception when the topology is ambiguous."""
[docs]class FlowMissingDeploymentError(Exception, BaseJinaException):
"""Flow exception when a deployment can not be found in the flow."""
[docs]class FlowBuildLevelError(Exception, BaseJinaException):
"""Flow exception when required build level is higher than the current build level."""
[docs]class BadConfigSource(FileNotFoundError, BaseJinaException):
"""The yaml config file is bad, not loadable or not exist."""
[docs]class BadClient(Exception, BaseJinaException):
"""A wrongly defined client, can not communicate with jina server correctly."""
[docs]class BadClientCallback(BadClient, BaseJinaException):
"""Error in the callback function on the client side."""
[docs]class BadRequestType(TypeError, BaseJinaException):
"""Exception when can not construct a request object from given data."""
[docs]class BadClientResponse(Exception, BaseJinaException):
"""Exception when can not construct a request object from given data."""
[docs]class BadImageNameError(Exception, BaseJinaException):
"""Exception when an image name can not be found either local & remote"""
[docs]class BadYAMLVersion(Exception, BaseJinaException):
"""Exception when YAML config specifies a wrong version number."""
[docs]class DaemonConnectivityError(Exception, BaseJinaException):
"""Exception to raise when jina daemon is not reachable."""
[docs]class DaemonWorkspaceCreationFailed(Exception, BaseJinaException):
"""Exception to raise when jina daemon is not connectable."""
[docs]class DaemonPodCreationFailed(Exception, BaseJinaException):
"""Exception to raise when jina daemon is not connectable."""
[docs]class NotSupportedError(Exception, BaseJinaException):
"""Exception when user accidentally using a retired argument."""
[docs]class RuntimeRunForeverEarlyError(Exception, BaseJinaException):
"""Raised when an error occurs when starting the run_forever of Runtime"""
[docs]class DockerVersionError(SystemError, BaseJinaException):
"""Raised when the docker version is incompatible"""
[docs]class DaemonInvalidDockerfile(FileNotFoundError, BaseJinaException):
"""Raised when invalid dockerfile is passed to JinaD"""
[docs]class NoContainerizedError(Exception, BaseJinaException):
"""Raised when trying to use non-containerized Executor in K8s or Docker Compose"""