Coverage for pephubclient/pephub_oauth/exceptions.py: 67%
6 statements
« prev ^ index » next coverage.py v7.15.3, created at 2026-08-04 18:15 +0000
« prev ^ index » next coverage.py v7.15.3, created at 2026-08-04 18:15 +0000
1"""auth exceptions"""
4class PEPHubResponseException(Exception):
5 """Request response exception. Used when response != 200"""
7 def __init__(self, reason: str = ""):
8 """
9 Optionally provide explanation for exceptional condition.
10 :param str reason: some context or perhaps just a value that
11 could not be interpreted as an accession
12 """
13 super(PEPHubResponseException, self).__init__(reason)
16class PEPHubTokenExchangeException(Exception):
17 """Exception in exchanging device code on token == 400"""
19 def __init__(self, reason: str = ""):
20 """
21 Optionally provide explanation for exceptional condition.
23 :param str reason: some context or perhaps just a value that
24 could not be interpreted as an accession
25 """
26 super(PEPHubTokenExchangeException, self).__init__(reason)