dropbox: make error insufficient space to be fatal

vfs-used-is-size
harry 2020-03-26 14:15:35 +05:30 committed by Nick Craig-Wood
parent 7d9ca3998e
commit d91a547d59
1 changed files with 5 additions and 1 deletions

6
backend/dropbox/dropbox.go Normal file → Executable file
View 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 {