summaryrefslogtreecommitdiffstats
path: root/web/static/js
diff options
context:
space:
mode:
authorraylu <raylu@gridium.com>2013-10-24 23:57:30 -0700
committerraylu <raylu@gridium.com>2013-10-25 00:03:13 -0700
commit4fb8abde07e94889ba1acfc86e0b36319c136b97 (patch)
treeb4b3cc15ac7845b7b71d33b81f56c566b7bc2f57 /web/static/js
parentb9b4dfb68d50a0416001665d72b14c26bd8b3235 (diff)
downloadykill-4fb8abde07e94889ba1acfc86e0b36319c136b97.tar.xz
handle invalid ids
Diffstat (limited to 'web/static/js')
-rw-r--r--web/static/js/common.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/static/js/common.js b/web/static/js/common.js
index c987242..9d1451f 100644
--- a/web/static/js/common.js
+++ b/web/static/js/common.js
@@ -10,6 +10,13 @@
new Request.JSON({
'url': ykill.api_host + path,
'onSuccess': cb,
+ 'onFailure': function(xhr) {
+ $('wrapper').empty().grab(new Element('div', {
+ 'class': 'error',
+ 'html': 'as you pass through the wormhole you realize that it collapses behind you.' +
+ '<br>have you become trapped?'
+ }));
+ },
}).get();
},