refactor(frontend): error handling in the auth/local api route

This now uses the new error code for a disabled registration (403) and also handles error where the password is too weak (400).

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2023-01-08 16:11:41 +01:00 committed by David Mehren
parent 0ec9edc07d
commit 45e70434c4
4 changed files with 11 additions and 5 deletions

View file

@ -561,7 +561,8 @@
"message": "Your account has been registered successfully. You can now log in with your username and password."
},
"error": {
"registrationDisabled": "The registration is disabled",
"passwordTooWeak": "The password is too weak.",
"registrationDisabled": "The registration is disabled.",
"usernameExisting": "There is already an account with this username.",
"other": "There was an error while registering your account. Just try it again."
}