From 48f162b9df39cf659042efa6dbab8d0a76672826 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 20 Oct 2015 14:03:37 +0100 Subject: [PATCH 1/2] Better error messages --- src/controllers/templates/Login.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/controllers/templates/Login.js b/src/controllers/templates/Login.js index c14ed28c4a..62cde0c5e5 100644 --- a/src/controllers/templates/Login.js +++ b/src/controllers/templates/Login.js @@ -94,8 +94,14 @@ module.exports = { self.setStep("stage_m.login.password"); if (error.httpStatus == 400 && loginParams.medium) { 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 + ")" + }); } }); }, From d1af5a2232ff71b7a23c2a5443c4dd945d38cb8b Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 21 Oct 2015 14:30:59 +0100 Subject: [PATCH 2/2] More tweaks on error messages --- src/controllers/templates/Login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/templates/Login.js b/src/controllers/templates/Login.js index 62cde0c5e5..3472bf32ce 100644 --- a/src/controllers/templates/Login.js +++ b/src/controllers/templates/Login.js @@ -96,7 +96,7 @@ module.exports = { self.setState({errorText: 'This Home Server does not support login using email address.'}); } else if (error.httpStatus === 403) { - self.setState({errorText: 'The provided credentials are incorrect.'}); + self.setState({errorText: 'Incorrect username and/or password.'}); } else { self.setState({