Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frontend/src/hooks/useAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const useAuth = () => {
errDetail = err.message
}

if (Array.isArray(errDetail)) {
errDetail = "Something went wrong"
Comment on lines +46 to +47
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is usually when getting a pydantic validation error.

It would be nice to make the error to each field, but it's not straightforward 😊

}

setError(errDetail)
},
})
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/routes/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ function Login() {
})}
placeholder="Email"
type="email"
required
/>
{errors.username && (
<FormErrorMessage>{errors.username.message}</FormErrorMessage>
Expand All @@ -103,6 +104,7 @@ function Login() {
{...register("password")}
type={show ? "text" : "password"}
placeholder="Password"
required
/>
<InputRightElement
color="ui.dim"
Expand Down