From: Andrew Dolgov Date: Sat, 13 Nov 2010 16:35:50 +0000 (+0300) Subject: subscribetofeed: handle server error/wrong output properly X-Git-Tag: 1.5.0~235 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d3204726a56471bf8f7add5fd38db6dd149fb022;p=tt-rss.git subscribetofeed: handle server error/wrong output properly --- diff --git a/functions.js b/functions.js index d798f6bf..d2618c98 100644 --- a/functions.js +++ b/functions.js @@ -585,8 +585,11 @@ function subscribeToFeed() { try { - if (!transport.responseXML) + if (!transport.responseXML) { console.log(transport.responseText); + alert(__("Server error while trying to subscribe to specified feed.")); + return; + } var result = transport.responseXML.getElementsByTagName('result')[0]; var rc = parseInt(result.getAttribute('code'));