Skip to content

Commit

Permalink
chore: add unexpected error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
harbassan committed Oct 4, 2024
1 parent b771649 commit 2978959
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/features/login/LoginPage/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ export default function LoginPage() {
handleSignIn(user)
.then(() => history.push(redirectPath))
.catch((e) => {
if (e.response.status === 403) {
if (e.response?.status === 403) {
toast.error("Please sign in with your UoA account");
signOut();
} else {
console.log(e);
toast.error("An unexpected error occurred while signing in");
}
});
}, [user]);
Expand Down

0 comments on commit 2978959

Please sign in to comment.