hyb
2025-11-07 cadac0a99d87c53805a07f3b4ca7fd11e524fe4a
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
from typing import Iterable
 
 
class RequestTokenErr(Exception):
    """
    Represents an exception during token request.
    """
 
    def __init__(self, *args):
        super().__init__(*args)
 
 
class InvalidTokenSchemaErr(Exception):
    """
    Represents an exception related to invalid token schema.
    """
 
    def __init__(self, missing_fields: Iterable[str] = []):
        super().__init__(
            "Unexpected token schema. Following fields are missing: "
            + ", ".join(missing_fields)
        )
 
 
class TokenRenewalErr(Exception):
    """
    Represents an exception during token renewal process.
    """
 
    def __init__(self, *args):
        super().__init__(*args)