Source code for aiokem.exceptions
"""Exceptions for the aiokem package."""
from __future__ import annotations
[docs]
class AioKemError(Exception):
"""Base exception for the aiokem package."""
pass
[docs]
class ServerError(AioKemError):
"""Exception raised for server-related errors."""
def __init__(self, message: str = "Server error"):
super().__init__(message)
[docs]
class AuthenticationError(AioKemError):
"""Exception raised for authentication-related errors."""
def __init__(self, message: str = "Authentication failed"):
super().__init__(message)
[docs]
class AuthenticationCredentialsError(AuthenticationError):
"""Exception raised for authentication-related errors."""
def __init__(self, message: str = "Authentication failed"):
super().__init__(message)
[docs]
class CommunicationError(AioKemError):
"""Exception raised for communication-related errors."""
def __init__(self, message: str = "Communication error"):
super().__init__(message)