fix(back): Improve error message when requesting reset passwords and new instructions

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-05-17 09:46:50 +02:00
parent 73eb4603b1
commit 1c1d0d47d7
2 changed files with 11 additions and 3 deletions

View File

@@ -303,7 +303,11 @@ defmodule Mobilizon.GraphQL.Resolvers.User do
{:error, dgettext("errors", "This email doesn't seem to be valid")}
{:error, :email_too_soon} ->
{:error, dgettext("errors", "You requested again a confirmation email too soon")}
{:error,
dgettext(
"errors",
"You requested again a confirmation email too soon. Please try again in a few minutes"
)}
end
end
@@ -330,7 +334,11 @@ defmodule Mobilizon.GraphQL.Resolvers.User do
{:error, dgettext("errors", "No user with this email was found")}
{:error, :email_too_soon} ->
{:error, dgettext("errors", "You requested again a confirmation email too soon")}
{:error,
dgettext(
"errors",
"You requested again a password reset email too soon. Please try again in a few minutes"
)}
end
end