Skip to content
Permalink
Browse files

log json fetching error messages

  • Loading branch information...
illwieckz committed Aug 20, 2019
1 parent 2864a20 commit fc50bff25e43ba6e3268d7e4e57972c75a6b5587
Showing with 5 additions and 3 deletions.
  1. +5 −3 News.qml
@@ -25,10 +25,12 @@ Item {
try {
newsObj = JSON.parse(news.responseText);
} catch (error) {
console.log("failed to parse posts json")
console.log("failed to parse posts json with error: " + error.name);
console.log("message: " + error.message);
}
} else {
console.log("failed to fetch posts json")
console.log("failed to fetch posts json with code: " + news.status);
console.log("status: " + news.statusText);
}

if (newsObj === null) {
@@ -68,7 +70,7 @@ Item {
}
}

console.log("fetching recent posts JSON")
console.log("fetching recent posts json")
news.open('GET', 'http://www.unvanquished.net/?json=get_recent_posts');
news.send();
}

0 comments on commit fc50bff

Please sign in to comment.
You can’t perform that action at this time.