Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

box: retry operation_blocked_temporary errors #5545

Nick Craig-Woodf4c5f1f18543
diff --git a/backend/box/box.go b/backend/box/box.go
index addcc4fc9..93bd373e4 100644
--- a/backend/box/box.go
+++ b/backend/box/box.go
@@ -339,6 +339,13 @@ func shouldRetry(ctx context.Context, resp *http.Response, err error) (bool, err
authRetry = true
fs.Debugf(nil, "Should retry: %v", err)
}
+
+ // Box API errors which should be retries
+ if apiErr, ok := err.(*api.Error); ok && apiErr.Code == "operation_blocked_temporary" {
+ fs.Debugf(nil, "Retrying API error %v", err)
+ return true, err
+ }
+
return authRetry || fserrors.ShouldRetry(err) || fserrors.ShouldRetryHTTP(resp, retryErrorCodes), err
}