Exceptions#
This page contains a list of exceptions that are thrown by BentoML.
- class bentoml.exceptions.BentoMLException(message: str)[source]#
Base class for all BentoMLâs errors. Each custom exception should be derived from this class.
- class bentoml.exceptions.RemoteException(message: str, payload: Optional[BentoMLException] = None)[source]#
A special exception that is used to wrap the exception from remote server
- class bentoml.exceptions.InvalidArgument(message: str)[source]#
Raised when BentoML received unexpected/invalid arguments from CLI arguments, HTTP Request, or python API function parameters.
- class bentoml.exceptions.MissingDependencyException(message: str)[source]#
Raised when BentoML component failed to load required dependencies.
Some BentoML components have optional dependencies that can be installed as extensions.
For example, when using the
JSON
IODescriptor,pydantic
is considered as an optional feature if users want to use it to validate. BentoML will still work withoutÂpydantic
 installed.
- class bentoml.exceptions.InternalServerError(message: str)[source]#
Raised when BentoML received valid arguments from CLI arguments, HTTP Request, or python API function parameters, but got internal issues while processing.
Note to BentoML developers: raise this exception only when exceptions happend
in the usersâ code (runner or service) and want to surface it to the user.
- class bentoml.exceptions.NotFound(message: str)[source]#
Raised when specified resource or name not found
- class bentoml.exceptions.BadInput(message: str)[source]#
Raised when API server receiving bad input request
Raised when incoming requests exceeds the capacity of a server