mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 07:29:35 +01:00
box: retry operation_blocked_temporary errors #5545
This commit is contained in:
parent
825f7826f5
commit
f4c5f1f185
@ -339,6 +339,13 @@ func shouldRetry(ctx context.Context, resp *http.Response, err error) (bool, err
|
|||||||
authRetry = true
|
authRetry = true
|
||||||
fs.Debugf(nil, "Should retry: %v", err)
|
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
|
return authRetry || fserrors.ShouldRetry(err) || fserrors.ShouldRetryHTTP(resp, retryErrorCodes), err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user