fix(login): don't let button text stuck at "Verifying" if you get rate limited (#35671)
Resolves #35402 Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
26ee104480
commit
678d7ab0f9
1 changed files with 4 additions and 5 deletions
|
|
@ -215,12 +215,10 @@ login.login_handlers = (function () {
|
|||
}) || []).join('<br>') || default_message;
|
||||
}
|
||||
|
||||
if (message === default_message) {
|
||||
login.set_invalid(message);
|
||||
} else {
|
||||
login.set_invalid(default_message);
|
||||
if (message !== default_message) {
|
||||
login.reset_sections(false);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -290,7 +288,8 @@ login.login_handlers = (function () {
|
|||
401: get_error_handler({{ _("Invalid Login. Try again.") | tojson }}),
|
||||
417: get_error_handler({{ _("Oops! Something went wrong.") | tojson }}),
|
||||
404: get_error_handler({{ _("User does not exist.") | tojson }}),
|
||||
500: get_error_handler({{ _("Something went wrong.") | tojson }})
|
||||
429: get_error_handler({{ _("Too many requests. Please try again later.") | tojson }}),
|
||||
500: get_error_handler({{ _("Something went wrong.") | tojson }}),
|
||||
};
|
||||
|
||||
return login_handlers;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue