mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-18 15:05:08 +00:00
Added exception for invalid tokens
This commit is contained in:
parent
ddb00602ab
commit
963029808b
1 changed files with 7 additions and 0 deletions
|
@ -10,8 +10,10 @@ __all__ = (
|
|||
'OrganizationNotFound',
|
||||
'RepositoryNotFound',
|
||||
'ObjectNotFound',
|
||||
'IssueNotFound',
|
||||
'NoAuthProvided',
|
||||
'InvalidAuthCombination',
|
||||
'InvalidToken',
|
||||
'AlreadyStarted',
|
||||
'NotStarted'
|
||||
)
|
||||
|
@ -70,6 +72,11 @@ class InvalidAuthCombination(APIError):
|
|||
msg = 'You must provide both a username and a user token or neither.'
|
||||
super().__init__(msg)
|
||||
|
||||
class InvalidToken(APIError):
|
||||
def __init__(self) -> None:
|
||||
msg = "The token you provided was invalid, please check again."
|
||||
super().__init__(msg)
|
||||
|
||||
class AlreadyStarted(APIError):
|
||||
"""Raised when start is called multiple times."""
|
||||
def __init__(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue