[docs]classDataServiceException(Exception):"""Base class for all DataService exceptions."""def__init__(self,message:str,status_code:int|None=None):"""Initialize the DataService. :param message: The message to display. :param status_code: The status code of the response if there is one """self.status_code=status_codesuper().__init__(message)
[docs]classParsingException(DataServiceException):"""Exception raised when parsing fails."""
[docs]classNonRetryableException(DataServiceException):"""Exception for non retryable exceptions."""
[docs]classRetryableException(DataServiceException):"""Base class for all retryable exceptions."""
[docs]classTimeoutException(DataServiceException):"""Exception raised when a request times out."""