Changed error message for failed registration

This commit is contained in:
Risto Lahtela 2020-10-25 21:43:08 +02:00
parent fedf8a953a
commit e8a9fb0c03
2 changed files with 2 additions and 1 deletions

View File

@ -108,7 +108,7 @@ public class RegistrationCommands {
if (user.isPresent()) {
registerUser(user.get(), sender, getPermissionLevel(sender));
} else {
throw new IllegalArgumentException(locale.getString(FailReason.USER_DOES_NOT_EXIST));
throw new IllegalArgumentException(locale.getString(FailReason.USER_INFORMATION_NOT_FOUND));
}
}

View File

@ -29,6 +29,7 @@ public enum FailReason implements Lang {
EXPIRED_COOKIE("User cookie has expired"),
USER_AND_PASS_NOT_SPECIFIED("User and Password not specified"),
USER_DOES_NOT_EXIST("User does not exist"),
USER_INFORMATION_NOT_FOUND("Registration failed, try again (The code expires after 15 minutes)"),
USER_PASS_MISMATCH("User and Password did not match"),
DATABASE_NOT_OPEN("Database is not open, check db status with /plan info"),
ERROR("Authentication failed due to error");