Skip to content

Commit

Permalink
fix:show generic error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Dami-18 committed Jul 14, 2024
1 parent b96b413 commit fb69a2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Electives.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const Electives: React.FC = () => {
const resData = await res.json();

if (!res.ok) {
toast.error("Some Error Occured. Please Try Again.");
toast.error(resData.message);
if (res.status == 401)
if (resData.message == "Invalid Password" || resData.message == "Session isn't alive. PLease login again.")
if (resData.message == "Session isn't alive. PLease login again.")
logout();
return;
}
Expand Down

0 comments on commit fb69a2f

Please sign in to comment.