From 4fb8abde07e94889ba1acfc86e0b36319c136b97 Mon Sep 17 00:00:00 2001 From: raylu Date: Thu, 24 Oct 2013 23:57:30 -0700 Subject: handle invalid ids --- web/static/js/common.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'web/static/js/common.js') 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.' + + '
have you become trapped?' + })); + }, }).get(); }, -- cgit v1.2.3