mirror of
https://github.com/wassname/talk.git
synced 2026-07-11 08:19:34 +08:00
Cleans error on email address or name. We need to go through all the errors and manage them better with translations.
This commit is contained in:
@@ -82,7 +82,9 @@ export const fetchSignUp = formData => (dispatch) => {
|
||||
dispatch(changeView('SIGNIN'));
|
||||
}, 3000);
|
||||
})
|
||||
.catch(() => dispatch(signUpFailure(lang.t('error.emailInUse')))); // We need to inprove error handling. TODO (bc)
|
||||
.catch(() => {
|
||||
dispatch(signUpFailure(lang.t('error.emailORusernameInUse')));
|
||||
}); // We need to improve error handling. TODO (bc)
|
||||
};
|
||||
|
||||
// Forgot Password Actions
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
"displayName": "Display name is too short",
|
||||
"confirmPassword": "Passwords don`t match. Please, check again",
|
||||
"emailPasswordError": "Email and/or password combination incorrect.",
|
||||
"emailInUse": "Email address already in use"
|
||||
"emailInUse": "Email address already in use",
|
||||
"emailORusernameInUse": "Email address or Username already in use"
|
||||
}
|
||||
},
|
||||
"es": {
|
||||
@@ -24,7 +25,8 @@
|
||||
"displayName": "El nombre es muy corto",
|
||||
"confirmPassword": "Las contraseñas no coinciden",
|
||||
"emailPasswordError": "Email y/o contraseña incorrecta.",
|
||||
"emailInUse": "Email address already in use"
|
||||
"emailInUse": "Correo electronico en uso.",
|
||||
"emailORusernameInUse": "Correo o Nombre en uso."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ export default {
|
||||
alreadyHaveAnAccount: 'Already have an account?',
|
||||
recoverPassword: 'Recover password',
|
||||
emailInUse: 'Email address already in use',
|
||||
emailORusernameInUse: 'Email address or Username already in use',
|
||||
requiredField: 'This field is required',
|
||||
passwordsDontMatch: 'Passwords don\'t match.',
|
||||
checkTheForm: 'Invalid Form. Please, check the fields'
|
||||
@@ -44,6 +45,7 @@ export default {
|
||||
alreadyHaveAnAccount: 'Ya tienes una cuenta?',
|
||||
recoverPassword: 'Recuperar contraseña',
|
||||
emailInUse: 'Este email se encuentra en uso',
|
||||
emailORusernameInUse: 'Este email ó nombre se encuentran en uso',
|
||||
requiredField: 'Este campo es requerido',
|
||||
passwordsDontMatch: 'Las contraseñas no coinciden',
|
||||
checkTheForm: 'Formulario Inválido. Por favor, completa los campos'
|
||||
|
||||
+1
-1
@@ -356,7 +356,7 @@ UserService.createLocalUser = (email, password, displayName) => {
|
||||
user.save((err) => {
|
||||
if (err) {
|
||||
if (err.code === 11000) {
|
||||
return reject('Email address already in use');
|
||||
return reject(new Error('Email address or Name already in use'));
|
||||
}
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user