refactor: Log server response on version check error
Qt `errorString()` only contains the error code and error text, but not the response body. And, in HTTP/2 the error string is gone but the error is still printed like it's there: https://bugreports.qt.io/browse/QTBUG-140126
This commit is contained in:
parent
e674d8b27c
commit
189053697b
1 changed files with 1 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ void VersionChecker::replyFinished(QNetworkReply *reply)
|
||||||
const auto httpStatus = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
const auto httpStatus = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||||
if (reply->error() != QNetworkReply::NoError) {
|
if (reply->error() != QNetworkReply::NoError) {
|
||||||
qWarning("version check server error: %s", qPrintable(reply->errorString()));
|
qWarning("version check server error: %s", qPrintable(reply->errorString()));
|
||||||
|
qWarning("version check server response: %s", qPrintable(QString(reply->readAll())));
|
||||||
qWarning("error checking for updates, http status: %d", httpStatus);
|
qWarning("error checking for updates, http status: %d", httpStatus);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue