From 48f162b9df39cf659042efa6dbab8d0a76672826 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 20 Oct 2015 14:03:37 +0100 Subject: [PATCH] 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 + ")" + }); } }); },