]> git.wh0rd.org Git - tt-rss.git/commitdiff
subscribetofeed: handle server error/wrong output properly
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 13 Nov 2010 16:35:50 +0000 (19:35 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 13 Nov 2010 16:35:50 +0000 (19:35 +0300)
functions.js

index d798f6bfa5a8469a93860f8564a2416ff9b3c8c1..d2618c98953da272c24a0914ff304503cc2a3c6b 100644 (file)
@@ -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'));