mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:19:05 +08:00
Don't crash when cloud response is invalid JSON
Perhaps if the connection is interrupted this could happen. Fixes Sentry issue CURA-1QX.
This commit is contained in:
parent
adacb95dc6
commit
577e45595e
@ -43,6 +43,10 @@ class DriveApiService:
|
|||||||
return
|
return
|
||||||
|
|
||||||
backup_list_response = HttpRequestManager.readJSON(reply)
|
backup_list_response = HttpRequestManager.readJSON(reply)
|
||||||
|
if backup_list_response is None:
|
||||||
|
Logger.error("List of back-ups can't be parsed.")
|
||||||
|
changed([])
|
||||||
|
return
|
||||||
if "data" not in backup_list_response:
|
if "data" not in backup_list_response:
|
||||||
Logger.log("w", "Could not get backups from remote, actual response body was: %s",
|
Logger.log("w", "Could not get backups from remote, actual response body was: %s",
|
||||||
str(backup_list_response))
|
str(backup_list_response))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user