Coverage for src/bayernwerk_client/exceptions.py: 100%
6 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-17 13:07 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-17 13:07 +0000
1class BayernwerkClientError(Exception):
2 """Base exception for this library."""
5class AuthenticationError(BayernwerkClientError):
6 """Login or token refresh failed."""
9class ApiError(BayernwerkClientError):
10 """The icon-api.eon.com backend returned an error response."""
12 def __init__(self, status_code: int, message: str) -> None:
13 self.status_code = status_code
14 super().__init__(f"API request failed with status {status_code}: {message}")