Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fatal on "Storage temporarily unavailable" #7374

Merged
merged 1 commit into from
Aug 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't fatal on "Storage temporarily unavailable"
This is an unreliable workaround. The real fix will need to be deferred
to another release.

For #5088
ckamm committed Aug 12, 2019
commit 201f0bc85373baaa15406d77bb97067cc7a5cae9
9 changes: 7 additions & 2 deletions src/libsync/owncloudpropagator_p.h
Original file line number Diff line number Diff line change
@@ -59,8 +59,13 @@ inline SyncFileItem::Status classifyError(QNetworkReply::NetworkError nerror,
if (httpCode == 503) {
// When the server is in maintenance mode, we want to exit the sync immediatly
// so that we do not flood the server with many requests
return errorBody.contains(R"(>Sabre\DAV\Exception\ServiceUnavailable<)") ?
SyncFileItem::FatalError : SyncFileItem::NormalError;
// BUG: This relies on a translated string and is thus unreliable.
// In the future it should return a NormalError and trigger a status.php
// check that detects maintenance mode reliably and will terminate the sync run.
auto probablyMaintenance =
errorBody.contains(R"(>Sabre\DAV\Exception\ServiceUnavailable<)")
&& !errorBody.contains("Storage is temporarily not available");
return probablyMaintenance ? SyncFileItem::FatalError : SyncFileItem::NormalError;
}

if (httpCode == 412) {