Show error if the upload failed

Contributes to issue CURA-8609.
This commit is contained in:
Ghostkeeper 2021-10-11 14:57:21 +02:00
parent ffee4a2443
commit ffd3277854
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
3 changed files with 23 additions and 5 deletions

View file

@ -79,9 +79,11 @@ class UploadMaterialsJob(Job):
if error is not None:
Logger.error(f"Failed to upload material archive: {error}")
self.setResult(self.Result.FAILED)
return
self.setResult(self.Result.SUCCESS)
self.uploadCompleted.emit()
else:
self.setResult(self.Result.SUCCESS)
self.uploadCompleted.emit(self.getResult())
def onError(self, reply: "QNetworkReply", error: Optional["QNetworkReply.NetworkError"]):
pass # TODO: Handle errors.
Logger.error(f"Failed to upload material archive: {error}")
self.setResult(self.Result.FAILED)
self.uploadCompleted.emit(self.getResult())