Handle case where API provided deltaLink generates a further API error (#1175)

* Handle case where API provided deltaLink generates a further API error. Refer to: https://github.com/OneDrive/onedrive-api-docs/issues/1408
This commit is contained in:
abraunegg 2020-12-09 14:03:49 +11:00 committed by GitHub
parent 4a68eb40b7
commit 335eab326d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1452,6 +1452,12 @@ final class SyncEngine
}
} else {
// Default operation if not 404, 410, 429, 500 or 504 errors
// Issue #1174 handling where stored deltaLink is invalid
if ((e.httpStatusCode == 400) && (deltaLink != "")) {
// Set deltaLink to an empty entry so invalid URL is not reused
string emptyDeltaLink = "";
itemdb.setDeltaLink(driveId, idToQuery, emptyDeltaLink);
}
// display what the error is
displayOneDriveErrorMessage(e.msg);
return;