From d91a547d595d9fb1d942f08a1e9037c32f821713 Mon Sep 17 00:00:00 2001 From: harry Date: Thu, 26 Mar 2020 14:15:35 +0530 Subject: [PATCH] dropbox: make error insufficient space to be fatal --- backend/dropbox/dropbox.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 backend/dropbox/dropbox.go diff --git a/backend/dropbox/dropbox.go b/backend/dropbox/dropbox.go old mode 100644 new mode 100755 index f30205bed..07ce35dda --- a/backend/dropbox/dropbox.go +++ b/backend/dropbox/dropbox.go @@ -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 {