Don't crash if the returned error has no title

Fixes sentry issue CURA-23P
This commit is contained in:
Kostas Karmas 2021-04-14 17:20:02 +02:00
parent 45f5a222f0
commit 361bd8c6b1

View file

@ -608,7 +608,7 @@ class Toolbox(QObject, Extension):
# Check for errors:
if "errors" in json_data:
for error in json_data["errors"]:
Logger.log("e", "Request type [%s] got response showing error: %s", error["title"])
Logger.log("e", "Request type [%s] got response showing error: %s", error.get("title", "No error title found"))
self.setViewPage("errored")
return