forked from TrueCloudLab/rclone
dropbox: make error insufficient space to be fatal
This commit is contained in:
parent
7d9ca3998e
commit
d91a547d59
1 changed files with 5 additions and 1 deletions
6
backend/dropbox/dropbox.go
Normal file → Executable file
6
backend/dropbox/dropbox.go
Normal file → Executable file
|
@ -225,7 +225,11 @@ func shouldRetry(err error) (bool, error) {
|
|||
return false, err
|
||||
}
|
||||
baseErrString := errors.Cause(err).Error()
|
||||
// handle any official Retry-After header from Dropbox's SDK first
|
||||
// First check for Insufficient Space
|
||||
if strings.Contains(baseErrString, "insufficient_space") {
|
||||
return false, fserrors.FatalError(err)
|
||||
}
|
||||
// Then handle any official Retry-After header from Dropbox's SDK
|
||||
switch e := err.(type) {
|
||||
case auth.RateLimitAPIError:
|
||||
if e.RateLimitError.RetryAfter > 0 {
|
||||
|
|
Loading…
Reference in a new issue