From 2b3fc55891212be192aa61950d73a5fec69765de Mon Sep 17 00:00:00 2001 From: frostyfan109 Date: Tue, 28 May 2024 16:47:05 -0400 Subject: [PATCH] Add more detailed error statuses --- appstore/core/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appstore/core/views.py b/appstore/core/views.py index bf1d03b1..8f41040e 100644 --- a/appstore/core/views.py +++ b/appstore/core/views.py @@ -87,14 +87,14 @@ def auth_identity(request): try: token = UserIdentityToken.objects.get(token=raw_token) if not token.valid: - return HttpResponse() + return HttpResponse("The token is expired. Try restarting the app.", status=401) remote_user = token.user.get_username() response = HttpResponse(remote_user, status=200) response["REMOTE_USER"] = remote_user response["ACCESS_TOKEN"] = token.token return response except UserIdentityToken.DoesNotExist: - return HttpResponse("The token does not exist", status=401) + return HttpResponse("The token does not exist. Try restarting the app.", status=401) @login_required