b2: ignore already_hidden error on remove
Sometimes (possibly through eventual consistency) b2 returns an already_hidden error on a delete. Ignore this since it is harmless.
This commit is contained in:
parent
ac7e1dbf62
commit
5aa706831f
1 changed files with 7 additions and 0 deletions
|
@ -952,6 +952,13 @@ func (f *Fs) hide(Name string) error {
|
|||
return f.shouldRetry(resp, err)
|
||||
})
|
||||
if err != nil {
|
||||
if apiErr, ok := err.(*api.Error); ok {
|
||||
if apiErr.Code == "already_hidden" {
|
||||
// sometimes eventual consistency causes this, so
|
||||
// ignore this error since it is harmless
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return errors.Wrapf(err, "failed to hide %q", Name)
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue