1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
"""Exceptions for the OVO Energy API."""
# Base Exceptions
class OVOEnergyException(Exception):
"""Base exception for OVO Energy."""
class OVOEnergyNoAccount(OVOEnergyException):
"""Exception for no account found."""
# API Exceptions
class OVOEnergyAPIException(OVOEnergyException):
"""Exception for API exceptions."""
class OVOEnergyAPIInvalidResponse(OVOEnergyAPIException):
"""Exception for invalid response."""
class OVOEnergyAPINotAuthorized(OVOEnergyAPIException):
"""Exception for API client not authorized."""
class OVOEnergyAPINotFound(OVOEnergyAPIException):
"""Exception for API endpoint not found (404)."""
class OVOEnergyAPINoCookies(OVOEnergyAPIException):
"""Exception for no cookies found."""
class OVOEnergyNoCustomer(OVOEnergyException):
"""Exception for no customer found."""
|