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:
gaba
2017-01-06 16:38:44 -03:00
parent 8a1eedb0b2
commit 712e436f58
4 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -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);
}