mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
Make expired token error message more useful (#1851)
* Make expired token error message more useful
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
- Fix issue where `PATCH /api/v1/users[user_id]` returned a list instead of a dict
|
||||
- Fix exception that occured on demoting admins through `PATCH /api/v1/users[user_id]`
|
||||
- Add `team_id` to `GET /api/v1/users` to determine if a user is already in a team
|
||||
- Provide a more useful error message when using an expired token
|
||||
|
||||
**Themes**
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ def init_request_processors(app):
|
||||
except UserNotFoundException:
|
||||
abort(401)
|
||||
except UserTokenExpiredException:
|
||||
abort(401)
|
||||
abort(401, description="Your access token has expired")
|
||||
except Exception:
|
||||
abort(401)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user