From 53cb2ce1891066c0437effb7a961a1c982f320f2 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 8 Jan 2019 13:29:45 +0100 Subject: [PATCH] Add comments for http status >=300 check CURA-6005 --- plugins/CuraDrive/src/DriveApiService.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/CuraDrive/src/DriveApiService.py b/plugins/CuraDrive/src/DriveApiService.py index 23e70a978c..7c1f8faa83 100644 --- a/plugins/CuraDrive/src/DriveApiService.py +++ b/plugins/CuraDrive/src/DriveApiService.py @@ -45,6 +45,8 @@ class DriveApiService: "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: 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()