mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Don't log sentry issues when backup fails due to size
We do not consider this necessary since it is not a crash.
This commit is contained in:
parent
5a5e913f57
commit
50d9b1284c
1 changed files with 0 additions and 7 deletions
|
@ -5,7 +5,6 @@ import threading
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
import sentry_sdk
|
|
||||||
from PyQt5.QtNetwork import QNetworkReply
|
from PyQt5.QtNetwork import QNetworkReply
|
||||||
|
|
||||||
from UM.Job import Job
|
from UM.Job import Job
|
||||||
|
@ -99,13 +98,7 @@ class CreateBackupJob(Job):
|
||||||
if HttpRequestManager.safeHttpStatus(reply) == 400:
|
if HttpRequestManager.safeHttpStatus(reply) == 400:
|
||||||
errors = json.loads(replyText)["errors"]
|
errors = json.loads(replyText)["errors"]
|
||||||
if "moreThanMaximum" in [error["code"] for error in errors if error["meta"] and error["meta"]["field_name"] == "backup_size"]:
|
if "moreThanMaximum" in [error["code"] for error in errors if error["meta"] and error["meta"]["field_name"] == "backup_size"]:
|
||||||
if self._backup_zip is None: # will never happen; keep mypy happy
|
|
||||||
zip_error = "backup is None."
|
|
||||||
else:
|
|
||||||
zip_error = "{} exceeds max size.".format(str(len(self._backup_zip)))
|
|
||||||
sentry_sdk.capture_message("backup failed: {}".format(zip_error), level ="warning")
|
|
||||||
self.backup_upload_error_message = catalog.i18nc("@error:file_size", "The backup exceeds the maximum file size.")
|
self.backup_upload_error_message = catalog.i18nc("@error:file_size", "The backup exceeds the maximum file size.")
|
||||||
from sentry_sdk import capture_message
|
|
||||||
|
|
||||||
self._job_done.set()
|
self._job_done.set()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue