From 000a3038e1b7a27f3f08faa669ece81f7d518891 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Fri, 12 Jan 2024 15:49:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=88=E7=AB=AF=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84MFA=E6=97=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/api/mfa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/authentication/api/mfa.py b/apps/authentication/api/mfa.py index 049cd177a..2d3a9b072 100644 --- a/apps/authentication/api/mfa.py +++ b/apps/authentication/api/mfa.py @@ -90,6 +90,6 @@ class MFAChallengeVerifyApi(AuthMixin, CreateAPIView): return Response({'msg': 'ok'}) except errors.AuthFailedError as e: data = {"error": e.error, "msg": e.msg} - raise ValidationError(data) + return Response(data, status=401) except errors.NeedMoreInfoError as e: return Response(e.as_data(), status=200)