Total Complexity | 1 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from typing import Optional |
||
|
|||
2 | |||
3 | |||
4 | class InvalidTokenError(ValueError): |
||
5 | |||
6 | def __init__(self, hint: Optional[str] = None): |
||
7 | """Exception raised when the authorization token is invalid. |
||
8 | |||
9 | :param hint: |
||
10 | Additional information about the exception cause. |
||
11 | """ |
||
12 | super(InvalidTokenError, self).__init__( |
||
13 | "The given token is not a valid token." + (str(hint) * bool(hint)) |
||
14 | ) |
||
15 |