Make expired token error message more useful (#1851)

* Make expired token error message more useful
This commit is contained in:
Kevin Chung
2021-03-25 11:59:59 -04:00
committed by GitHub
parent ca2ab13f0d
commit 88c53f3510
2 changed files with 2 additions and 1 deletions

View File

@@ -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**

View File

@@ -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: