diff options
author | Erik Johnston <erik@matrix.org> | 2014-09-12 18:19:32 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-09-12 18:19:32 +0100 |
commit | e3aec9bc818e203a4883f8863acb96b9c273112a (patch) | |
tree | 762f87365f917f510f00bc6aee7a4068cdd56e76 /jsfiddles/register_login/demo.js | |
parent | fix embarassing bug where in-progress messages get vaped when the previous on... (diff) | |
parent | Bump version and change log (diff) | |
download | synapse-e3aec9bc818e203a4883f8863acb96b9c273112a.tar.xz |
Merge branch 'release-v0.2.3' of github.com:matrix-org/synapse
Conflicts: webclient/room/room-controller.js
Diffstat (limited to 'jsfiddles/register_login/demo.js')
-rw-r--r-- | jsfiddles/register_login/demo.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/jsfiddles/register_login/demo.js b/jsfiddles/register_login/demo.js index 9595039173..fffa9e0551 100644 --- a/jsfiddles/register_login/demo.js +++ b/jsfiddles/register_login/demo.js @@ -20,7 +20,12 @@ $('.register').live('click', function() { showLoggedIn(data); }, error: function(err) { - alert(JSON.stringify($.parseJSON(err.responseText))); + var errMsg = "To try this, you need a home server running!"; + var errJson = $.parseJSON(err.responseText); + if (errJson) { + errMsg = JSON.stringify(errJson); + } + alert(errMsg); } }); }); @@ -36,7 +41,12 @@ var login = function(user, password) { showLoggedIn(data); }, error: function(err) { - alert(JSON.stringify($.parseJSON(err.responseText))); + var errMsg = "To try this, you need a home server running!"; + var errJson = $.parseJSON(err.responseText); + if (errJson) { + errMsg = JSON.stringify(errJson); + } + alert(errMsg); } }); }; |