Custom exceptions for the nos client.
ClientException
dataclass
Base exception for the nos client.
Source code in nos/common/exceptions.py
| @dataclass(frozen=True)
class ClientException(Exception):
"""Base exception for the nos client."""
message: str
"""Exception message."""
exc: Exception = None
"""Exception object."""
def __str__(self) -> str:
return f"{self.message}"
|
message
instance-attribute
exc
class-attribute
instance-attribute
ServerReadyException
dataclass
Exception raised when the server is not ready.
Source code in nos/common/exceptions.py
| class ServerReadyException(ClientException):
"""Exception raised when the server is not ready."""
def __str__(self) -> str:
return f"Server not ready. {self.message}"
|
Exception raised when input validation fails.
Source code in nos/common/exceptions.py
| class InputValidationException(ClientException):
"""Exception raised when input validation fails."""
def __str__(self) -> str:
return f"Input validation failed. {self.message}"
|
InferenceException
dataclass
Exception raised when inference fails.
Source code in nos/common/exceptions.py
| class InferenceException(ClientException):
"""Exception raised when inference fails."""
def __str__(self) -> str:
return f"Inference failed. {self.message}"
|