File: err.py

package info (click to toggle)
python-redis 6.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,432 kB
  • sloc: python: 60,318; sh: 179; makefile: 128
file content (31 lines) | stat: -rw-r--r-- 694 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
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)