log network code on token response

This commit is contained in:
Martin Rotter 2021-06-30 07:19:34 +02:00
parent 42f164792a
commit 9ec9c891c5
3 changed files with 6 additions and 2 deletions

View file

@ -30,7 +30,7 @@
<url type="donation">https://martinrotter.github.io/donate/</url>
<content_rating type="oars-1.1" />
<releases>
<release version="3.9.2" date="2021-06-28"/>
<release version="3.9.2" date="2021-06-30"/>
</releases>
<content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute>

View file

@ -1,6 +1,6 @@
# Parses output of Nvidia's GDC web service, which provides
# list of articles.
# Sample input file whose contents must be provided as stdin: "https://www.nvidia.com/bin/nvidiaGDC/servlet/article.json?locale=en_US&region=us&type=both&tag=drivers&offset=0s"
# Sample input file whose contents must be provided as stdin: "https://www.nvidia.com/bin/nvidiaGDC/servlet/article.json?locale=en_US&region=us&type=both&tag=drivers&offset=0"
# This scripts outputs JSON feed 1.1: https://jsonfeed.org/version/1.1
import json

View file

@ -206,6 +206,10 @@ void OAuth2Service::tokenRequestFinished(QNetworkReply* network_reply) {
qDebugNN << LOGSEC_OAUTH << "Token response:" << QUOTE_W_SPACE_DOT(json_document.toJson());
if (network_reply->error() != QNetworkReply::NetworkError::NoError) {
qWarningNN << LOGSEC_OAUTH
<< "Network error when obtaining token response:"
<< QUOTE_W_SPACE_DOT(network_reply->error());
emit tokensRetrieveError(QString(), NetworkFactory::networkErrorText(network_reply->error()));
}
else if (root_obj.keys().contains("error")) {