mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Users where not shown some errors from cloud.
CURA-10442 and CURA-10443
This commit is contained in:
parent
5037d2f642
commit
3fa555bd58
2 changed files with 24 additions and 0 deletions
|
@ -135,9 +135,21 @@ class DFFileExportAndUploadManager:
|
||||||
file_name = file_upload_response.job_name if file_upload_response.job_name is not None else ""
|
file_name = file_upload_response.job_name if file_upload_response.job_name is not None else ""
|
||||||
else:
|
else:
|
||||||
Logger.log("e", "Wrong response type received. Aborting uploading file to the Digital Library")
|
Logger.log("e", "Wrong response type received. Aborting uploading file to the Digital Library")
|
||||||
|
getBackwardsCompatibleMessage(
|
||||||
|
text = "Upload error",
|
||||||
|
title = f"Failed to upload {file_name}. Received unexpected response from server.",
|
||||||
|
message_type_str = "ERROR",
|
||||||
|
lifetime = 0
|
||||||
|
).show()
|
||||||
return
|
return
|
||||||
if file_name not in self._file_upload_job_metadata:
|
if file_name not in self._file_upload_job_metadata:
|
||||||
Logger.error(f"API response for uploading doesn't match the file name we just uploaded: {file_name} was never uploaded.")
|
Logger.error(f"API response for uploading doesn't match the file name we just uploaded: {file_name} was never uploaded.")
|
||||||
|
getBackwardsCompatibleMessage(
|
||||||
|
text = "Upload error",
|
||||||
|
title = f"Failed to upload {file_name}. Name doesn't match the one sent back in confirmation.",
|
||||||
|
message_type_str = "ERROR",
|
||||||
|
lifetime = 0
|
||||||
|
).show()
|
||||||
return
|
return
|
||||||
with self._message_lock:
|
with self._message_lock:
|
||||||
self.progress_message.show()
|
self.progress_message.show()
|
||||||
|
|
|
@ -501,6 +501,12 @@ class DigitalFactoryController(QObject):
|
||||||
"""
|
"""
|
||||||
if not download_url:
|
if not download_url:
|
||||||
Logger.log("e", "No download url for file '{}'".format(file_name))
|
Logger.log("e", "No download url for file '{}'".format(file_name))
|
||||||
|
getBackwardsCompatibleMessage(
|
||||||
|
text = "Download error",
|
||||||
|
title = f"No download url could be found for '{file_name}'.",
|
||||||
|
message_type_str = "ERROR",
|
||||||
|
lifetime = 0
|
||||||
|
).show()
|
||||||
return
|
return
|
||||||
|
|
||||||
progress_message = Message(text = "{0}/{1}".format(project_name, file_name), dismissable = False, lifetime = 0,
|
progress_message = Message(text = "{0}/{1}".format(project_name, file_name), dismissable = False, lifetime = 0,
|
||||||
|
@ -584,6 +590,12 @@ class DigitalFactoryController(QObject):
|
||||||
"""
|
"""
|
||||||
if self._selected_project_idx == -1:
|
if self._selected_project_idx == -1:
|
||||||
Logger.log("e", "No DF Library project is selected.")
|
Logger.log("e", "No DF Library project is selected.")
|
||||||
|
getBackwardsCompatibleMessage(
|
||||||
|
text = "No Digital Library project was selected",
|
||||||
|
title = "No project selected",
|
||||||
|
message_type_str = "ERROR",
|
||||||
|
lifetime = 0
|
||||||
|
).show()
|
||||||
return
|
return
|
||||||
|
|
||||||
if filename == "":
|
if filename == "":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue