From 0f39ec580f01b62cc7685bfd18411a0b20071803 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 16 Jul 2015 22:06:00 +0100 Subject: [PATCH] Slightly improve error messages --- src/controllers/templates/Register.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/controllers/templates/Register.js b/src/controllers/templates/Register.js index 664b36b30..89a3872dc 100644 --- a/src/controllers/templates/Register.js +++ b/src/controllers/templates/Register.js @@ -337,6 +337,14 @@ module.exports = { }); } else if (error.httpStatus == 401) { newState.errorText = "Authorisation failed!"; + } else if (error.httpStatus >= 400 && error.httpStatus < 500) { + newState.errorText = "Registration failed!"; + } else if (error.httpStatus >= 500 && error.httpStatus < 600) { + newState.errorText = "Server error during registration!"; + } else if (error.name == "M_MISSING_PARAM") { + // The HS hasn't remembered the login params from + // the first try when the login email was sent. + newState.errorText = "This home server does not support resuming registration."; } self.setState(newState); }