File: exceptions.py

package info (click to toggle)
python-ovoenergy 3.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 352 kB
  • sloc: python: 1,519; makefile: 4
file content (35 lines) | stat: -rw-r--r-- 843 bytes parent folder | download | duplicates (2)
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."""