subscribetofeed: handle server error/wrong output properly

This commit is contained in:
Andrew Dolgov 2010-11-13 19:35:50 +03:00
parent 90c9c16f0e
commit d3204726a5
1 changed files with 4 additions and 1 deletions

View File

@ -585,8 +585,11 @@ function subscribeToFeed() {
try { try {
if (!transport.responseXML) if (!transport.responseXML) {
console.log(transport.responseText); console.log(transport.responseText);
alert(__("Server error while trying to subscribe to specified feed."));
return;
}
var result = transport.responseXML.getElementsByTagName('result')[0]; var result = transport.responseXML.getElementsByTagName('result')[0];
var rc = parseInt(result.getAttribute('code')); var rc = parseInt(result.getAttribute('code'));