From 81f02921bdae2eebdc47796393ea35301d520c76 Mon Sep 17 00:00:00 2001 From: Dami-18 Date: Sun, 14 Jul 2024 13:02:13 +0530 Subject: [PATCH] fix(frontend):handle invalid security answer --- frontend/src/components/SecurityQueForm.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/components/SecurityQueForm.tsx b/frontend/src/components/SecurityQueForm.tsx index 1f1a616..eca895f 100644 --- a/frontend/src/components/SecurityQueForm.tsx +++ b/frontend/src/components/SecurityQueForm.tsx @@ -63,6 +63,8 @@ const SecurityQueForm: React.FC = () => { if (res.status == 401) if (resData.message == "Invalid Password" || resData.message == "Session isn't alive. PLease login again.") return setAuth((prev) => ({ ...prev, currentStep: 0 })); + else if(resData.message == "Invalid Security Question Answer") + return if (res.status == 500) throw new Error(resData.message);