From 4c5dac0dfdbc908c5b88d9f83a215f3515becce9 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 14 Apr 2021 14:30:42 +0200 Subject: [PATCH] Improve logging, UX for cloud-upload-errors. One of the reasons this bug (see parent of this commit ... or the issue nr if you have internal access) was so vague is that A. the user was insufficiently prompted, and B. no one could find anything in our logs. CURA-8004 --- plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py | 4 ++++ .../src/Messages/PrintJobUploadErrorMessage.py | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py index c4efe6c85a..13a6a54e95 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py @@ -269,6 +269,8 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): else: PrintJobUploadErrorMessage(I18N_CATALOG.i18nc("@error:send", "Unknown error code when uploading print job: {0}", error_code)).show() + Logger.log("w", "Upload of print job failed specifically with error code {}".format(error_code)) + self._progress.hide() self._pre_upload_print_job = None self._uploaded_print_job = None @@ -279,6 +281,8 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): Displays the given message if uploading the mesh has failed due to a generic error (i.e. lost connection). :param message: The message to display. """ + Logger.log("w", "Upload error with message {}".format(message)) + self._progress.hide() self._pre_upload_print_job = None self._uploaded_print_job = None diff --git a/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadErrorMessage.py b/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadErrorMessage.py index 5145844ea7..9feb4b4970 100644 --- a/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadErrorMessage.py +++ b/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadErrorMessage.py @@ -13,6 +13,5 @@ class PrintJobUploadErrorMessage(Message): def __init__(self, message: str = None) -> None: super().__init__( text = message or I18N_CATALOG.i18nc("@info:text", "Could not upload the data to the printer."), - title = I18N_CATALOG.i18nc("@info:title", "Network error"), - lifetime = 10 + title = I18N_CATALOG.i18nc("@info:title", "Network error") )