Added access tokens for duplicates
This commit is contained in:
@@ -176,6 +176,20 @@ class UserAlreadyExists(Exception):
|
||||
}
|
||||
}
|
||||
|
||||
class AccessTokenInvalidError(Exception):
|
||||
"""Raises HTTP 401 if access token is not valid."""
|
||||
def __init__(self):
|
||||
self.openapi = {
|
||||
"description": "Invalid Access Token",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"example": {
|
||||
"detail": "Invalid access token."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class UserCredentialsInvalid(Exception):
|
||||
"""Raises HTTP 401 if user credentials are not valid."""
|
||||
def __init__(self):
|
||||
|
Reference in New Issue
Block a user