mirror of
https://github.com/rclone/rclone.git
synced 2025-02-21 06:24:10 +08:00
dropbox: make error insufficient space to be fatal
This commit is contained in:
parent
7d9ca3998e
commit
d91a547d59
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…
x
Reference in New Issue
Block a user