Better error messages

pull/21833/head
Kegan Dougal 2015-10-20 14:03:37 +01:00
parent 78f2f7cfd0
commit 48f162b9df
1 changed files with 8 additions and 2 deletions

View File

@ -94,8 +94,14 @@ module.exports = {
self.setStep("stage_m.login.password"); self.setStep("stage_m.login.password");
if (error.httpStatus == 400 && loginParams.medium) { if (error.httpStatus == 400 && loginParams.medium) {
self.setState({errorText: 'This Home Server does not support login using email address.'}); self.setState({errorText: 'This Home Server does not support login using email address.'});
} else { }
self.setState({errorText: 'Login failed.'}); else if (error.httpStatus === 403) {
self.setState({errorText: 'The provided credentials are incorrect.'});
}
else {
self.setState({
errorText: 'There was a problem logging in. (HTTP ' + error.httpStatus + ")"
});
} }
}); });
}, },