Skip to content

Commit

Permalink
feat(auth): improved error handling during login (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
s0up4200 committed May 3, 2024
1 parent f820060 commit f8715c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/screens/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export const Login = () => {
auth.login(variables.username)
router.invalidate()
},
onError: () => {
onError: (error) => {
toast.custom((t) => (
<Toast type="error" body="Wrong password or username!" t={t} />
<Toast type="error" body={error.message || "An error occurred!"} t={t} />
));
}
});
Expand Down

0 comments on commit f8715c1

Please sign in to comment.