diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-09-08 14:53:58 -0700 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-09-08 14:54:10 -0700 |
commit | 544691ab05e7b5e5a265e7fda2aab0fae3a83097 (patch) | |
tree | 432c0870218dc178499b113e22e6d725f2123774 /jsfiddles/room_memberships | |
parent | Add slightly helpful advice on how to generate config if you don'y already ha... (diff) | |
download | synapse-544691ab05e7b5e5a265e7fda2aab0fae3a83097.tar.xz |
Update jsfiddles to have more helpful error messages when there is no connection when logging in.
Diffstat (limited to 'jsfiddles/room_memberships')
-rw-r--r-- | jsfiddles/room_memberships/demo.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/jsfiddles/room_memberships/demo.js b/jsfiddles/room_memberships/demo.js index 64ba767138..8a7b1aa88e 100644 --- a/jsfiddles/room_memberships/demo.js +++ b/jsfiddles/room_memberships/demo.js @@ -28,7 +28,12 @@ $('.login').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); } }); }); |