fix for resend, cooldown and a few small fixes
This commit is contained in:
@@ -15,6 +15,7 @@ class ErrorHandler {
|
||||
'account_not_verified': locs.errorAccountNotVerified,
|
||||
'unauthorized': locs.errorLoginUnauthorized,
|
||||
'verification_token_not_found': locs.errorVerificationTokenNotFound,
|
||||
'user_already_registered': locs.errorDuplicateEmail,
|
||||
'internal_error': locs.errorInternalError,
|
||||
'invalid_target': locs.errorInvalidTarget,
|
||||
'pending_token_required': locs.errorPendingTokenRequired,
|
||||
@@ -62,6 +63,9 @@ class ErrorHandler {
|
||||
}
|
||||
|
||||
static String _handleErrorResponseLocs(AppLocalizations locs, ErrorResponse e) {
|
||||
if (e.source == 'user_already_registered') {
|
||||
return locs.errorDuplicateEmail;
|
||||
}
|
||||
final errorMessages = getErrorMessagesLocs(locs);
|
||||
// Return the localized message if we recognize the error key, else use the raw details
|
||||
return errorMessages[e.error] ?? e.details;
|
||||
|
||||
Reference in New Issue
Block a user