mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 16:16:00 +08:00
Add comments for http status >=300 check
CURA-6005
This commit is contained in:
parent
b4b7e1fc21
commit
53cb2ce189
@ -45,6 +45,8 @@ class DriveApiService:
|
|||||||
"Authorization": "Bearer {}".format(access_token)
|
"Authorization": "Bearer {}".format(access_token)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# HTTP status 300s mean redirection. 400s and 500s are errors.
|
||||||
|
# Technically 300s are not errors, but the use case here relies on "requests" to handle redirects automatically.
|
||||||
if backup_list_request.status_code >= 300:
|
if backup_list_request.status_code >= 300:
|
||||||
Logger.log("w", "Could not get backups list from remote: %s", backup_list_request.text)
|
Logger.log("w", "Could not get backups list from remote: %s", backup_list_request.text)
|
||||||
Message(catalog.i18nc("@info:backup_status", "There was an error listing your backups."), title = catalog.i18nc("@info:title", "Backup")).show()
|
Message(catalog.i18nc("@info:backup_status", "There was an error listing your backups."), title = catalog.i18nc("@info:title", "Backup")).show()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user