Include network response body in errors (#3987)

This commit is contained in:
pajlada
2022-09-11 14:32:08 +02:00
committed by GitHub
parent 7337e93a27
commit 5655a7d718
3 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -218,8 +218,8 @@ void loadUncached(const std::shared_ptr<NetworkData> &data)
QString(data->payload_));
}
// TODO: Should this always be run on the GUI thread?
postToThread([data, code = status.toInt()] {
data->onError_(NetworkResult({}, code));
postToThread([data, code = status.toInt(), reply] {
data->onError_(NetworkResult(reply->readAll(), code));
});
}