Ignore ObjectNotFound errors in delete api while enforcing locking (#11114)

AWS does not report this or version not found as errors in the response.
This commit is contained in:
Poorna Krishnamoorthy 2020-12-15 11:15:49 -08:00 committed by GitHub
parent f6fb27e8f0
commit 3456b03b12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,6 +97,9 @@ func enforceRetentionBypassForDelete(ctx context.Context, r *http.Request, bucke
return ErrNone
}
}
if isErrObjectNotFound(gerr) || isErrVersionNotFound(gerr) {
return ErrNone
}
return toAPIErrorCode(ctx, gerr)
}