Add logging if the status code of toolbox request is not 200

This commit is contained in:
Jaime van Kessel 2019-01-17 16:06:10 +01:00
parent 2cd6f6a834
commit 662dd80a1d

View file

@ -649,6 +649,7 @@ class Toolbox(QObject, Extension):
Logger.log("w", "Received invalid JSON for %s.", response_type)
break
else:
Logger.log("w", "Unable to connect with the server, we got a response code %s while trying to connect to %s", reply.attribute(QNetworkRequest.HttpStatusCodeAttribute), reply.url())
self.setViewPage("errored")
self.resetDownload()
elif reply.operation() == QNetworkAccessManager.PutOperation: