<filename>custom_components/panasonic_smart_app/smartApp/exceptions.py
class PanasonicBaseException(Exception):
    """ Base exception """


class PanasonicRefreshTokenNotFound(PanasonicBaseException):
    """ Refresh token not found """

    def __init__(
        self, message="Refresh token not existed. You may need to login again."
    ):
        super().__init__(message)
        self.message = message


class PanasonicTokenExpired(PanasonicBaseException):
    """ Token expired """


class PanasonicInvalidRefreshToken(PanasonicBaseException):
    """ Refresh token expired """


class PanasonicLoginFailed(PanasonicBaseException):
    """ Any other login exception """


class PanasonicDeviceOffline(PanasonicBaseException):
    """ Target device is offline """

    def __init__(
        self, message="Device is offline. Retry later..."
    ):
        super().__init__(message)
        self.message = message

class PanasonicExceedRateLimit(PanasonicBaseException):
    """ API reaches rate limit """

    def __init__(
        self, message="Reached API rate limit. Please try again later."
    ):
        super().__init__(message)
        self.message = message

<filename>custom_components/panasonic_smart_app/smartApp/exceptions.py
class PanasonicBaseException(Exception):
    """ Base exception """


class PanasonicRefreshTokenNotFound(PanasonicBaseException):
    """ Refresh token not found """

    def __init__(
        self, message="Refresh token not existed. You may need to login again."
    ):
        super().__init__(message)
        self.message = message


class PanasonicTokenExpired(PanasonicBaseException):
    """ Token expired """


class PanasonicInvalidRefreshToken(PanasonicBaseException):
    """ Refresh token expired """


class PanasonicLoginFailed(PanasonicBaseException):
    """ Any other login exception """


class PanasonicDeviceOffline(PanasonicBaseException):
    """ Target device is offline """

    def __init__(
        self, message="Device is offline. Retry later..."
    ):
        super().__init__(message)
        self.message = message

class PanasonicExceedRateLimit(PanasonicBaseException):
    """ API reaches rate limit """

    def __init__(
        self, message="Reached API rate limit. Please try again later."
    ):
        super().__init__(message)
        self.message = message

Base exception Refresh token not found Token expired Refresh token expired Any other login exception Target device is offline API reaches rate limit