return 401 for login failures (#15432)

* return 401 for login failures

* only setup the rate limiter when configured
This commit is contained in:
Blake Blackshear
2024-12-10 07:42:55 -06:00
committed by GitHub
parent 0b9c4c18dd
commit 6b12a45a95
4 changed files with 13 additions and 6 deletions

View File

@@ -63,7 +63,7 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
toast.error("Exceeded rate limit. Try again later.", {
position: "top-center",
});
} else if (err.response?.status === 400) {
} else if (err.response?.status === 401) {
toast.error("Login failed", {
position: "top-center",
});