Module valolyticspy.exceptions
Expand source code
class FailedAPIRequestException(Exception):
"""
Exception raised when an API request fails.
Attributes:
message (str): The error message associated with the exception.
"""
def __init__(self, message: str = None) -> None:
"""
Initializes a new instance of the FailedAPIRequestException class.
Args:
message (str, optional): The error message associated with the exception.
If not provided, a default message will be used.
"""
if message is None:
message = "An API request failed"
super().__init__(message)
Classes
class FailedAPIRequestException (message: str = None)-
Exception raised when an API request fails.
Attributes
message:str- The error message associated with the exception.
Initializes a new instance of the FailedAPIRequestException class.
Args
message:str, optional- The error message associated with the exception. If not provided, a default message will be used.
Expand source code
class FailedAPIRequestException(Exception): """ Exception raised when an API request fails. Attributes: message (str): The error message associated with the exception. """ def __init__(self, message: str = None) -> None: """ Initializes a new instance of the FailedAPIRequestException class. Args: message (str, optional): The error message associated with the exception. If not provided, a default message will be used. """ if message is None: message = "An API request failed" super().__init__(message)Ancestors
- builtins.Exception
- builtins.BaseException