mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-07-08 15:17:35 +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',
|
'OrganizationNotFound',
|
||||||
'RepositoryNotFound',
|
'RepositoryNotFound',
|
||||||
'ObjectNotFound',
|
'ObjectNotFound',
|
||||||
|
'IssueNotFound',
|
||||||
'NoAuthProvided',
|
'NoAuthProvided',
|
||||||
'InvalidAuthCombination',
|
'InvalidAuthCombination',
|
||||||
|
'InvalidToken',
|
||||||
'AlreadyStarted',
|
'AlreadyStarted',
|
||||||
'NotStarted'
|
'NotStarted'
|
||||||
)
|
)
|
||||||
|
@ -70,6 +72,11 @@ class InvalidAuthCombination(APIError):
|
||||||
msg = 'You must provide both a username and a user token or neither.'
|
msg = 'You must provide both a username and a user token or neither.'
|
||||||
super().__init__(msg)
|
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):
|
class AlreadyStarted(APIError):
|
||||||
"""Raised when start is called multiple times."""
|
"""Raised when start is called multiple times."""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue