feat: address QA analytics and report upload feedback
All checks were successful
All checks were successful
This commit is contained in:
@@ -11,6 +11,7 @@ from rest_framework.decorators import api_view, permission_classes
|
||||
from rest_framework.permissions import AllowAny, IsAdminUser, IsAuthenticated
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
from rest_framework_simplejwt.exceptions import TokenError
|
||||
from rest_framework_simplejwt.tokens import RefreshToken
|
||||
|
||||
from .serializers import (
|
||||
@@ -333,7 +334,7 @@ class TokenRefreshView(APIView):
|
||||
return Response(
|
||||
{"access": str(refresh.access_token), "refresh": str(refresh)}
|
||||
)
|
||||
except Exception:
|
||||
except TokenError:
|
||||
return Response(
|
||||
{"error": "Неверный refresh token"}, status=status.HTTP_401_UNAUTHORIZED
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user