mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-28 21:05:17 +02:00
Auth specific rate limiting (#3463)
* k * v1 * fully functional * finalize * nit * nit * nit * clean up with wrapper + comments * k * update * minor clean
This commit is contained in:
@@ -59,10 +59,14 @@ export function EmailPasswordForm({
|
||||
errorMsg =
|
||||
"An account already exists with the specified email.";
|
||||
}
|
||||
if (response.status === 429) {
|
||||
errorMsg = "Too many requests. Please try again later.";
|
||||
}
|
||||
setPopup({
|
||||
type: "error",
|
||||
message: `Failed to sign up - ${errorMsg}`,
|
||||
});
|
||||
setIsWorking(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -89,6 +93,9 @@ export function EmailPasswordForm({
|
||||
} else if (errorDetail === "NO_WEB_LOGIN_AND_HAS_NO_PASSWORD") {
|
||||
errorMsg = "Create an account to set a password";
|
||||
}
|
||||
if (loginResponse.status === 429) {
|
||||
errorMsg = "Too many requests. Please try again later.";
|
||||
}
|
||||
setPopup({
|
||||
type: "error",
|
||||
message: `Failed to login - ${errorMsg}`,
|
||||
|
Reference in New Issue
Block a user