Improve returned error code

This commit is contained in:
Pierre HUBERT 2022-04-03 17:48:55 +02:00
parent 1ff9c7686e
commit aa5327d603

View File

@ -75,7 +75,7 @@ pub async fn login_route(
.await.unwrap();
if failed_attempts > MAX_FAILED_LOGIN_ATTEMPTS {
return HttpResponse::InternalServerError().body(
return HttpResponse::TooManyRequests().body(
FatalErrorPage {
message: "Too many failed login attempts, please try again later!"
}.render().unwrap()