mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 11:55:56 +00:00
quickAddFeed: gracefully handle backend timeout/JSON parse problems
This commit is contained in:
@@ -829,7 +829,14 @@ function quickAddFeed() {
|
||||
onComplete: function(transport) {
|
||||
try {
|
||||
|
||||
var reply = JSON.parse(transport.responseText);
|
||||
try {
|
||||
var reply = JSON.parse(transport.responseText);
|
||||
} catch (e) {
|
||||
Element.hide("feed_add_spinner");
|
||||
alert(__("Failed to parse output. This can indicate server timeout and/or network issues. Backend output was logged to browser console."));
|
||||
console.log('quickAddFeed, backend returned:' + transport.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
var rc = reply['result'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user