Merge pull request #21 from matrix-org/220-login-error-msgs

Login error messages
This commit is contained in:
Kegsay 2015-10-26 16:58:46 +00:00
commit a2b77ad5b5

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: 'Incorrect username and/or password.'});
}
else {
self.setState({
errorText: 'There was a problem logging in. (HTTP ' + error.httpStatus + ")"
});
} }
}); });
}, },