Handle THREEPID_IN_USE error

This commit is contained in:
David Baker 2015-08-04 14:49:01 +01:00
parent 69ac0bd368
commit 259d9dc3a2
1 changed files with 8 additions and 4 deletions

View File

@ -242,10 +242,14 @@ module.exports = {
}); });
self.setStep('stage_m.login.email.identity'); self.setStep('stage_m.login.email.identity');
}, function(error) { }, function(error) {
self.setState({ self.setStep('initial');
busy: false, var newState = {busy: false};
errorText: 'Unable to contact the given Home Server' if (error.errcode == 'THREEPID_IN_USE') {
}); self.onBadFields({email: self.FieldErrors.InUse});
} else {
newState.errorText = 'Unable to contact the given Home Server';
}
self.setState(newState);
}); });
break; break;
case 'm.login.recaptcha': case 'm.login.recaptcha':