From 3456b03b12508e2d3200d6e575591413fa52cacc Mon Sep 17 00:00:00 2001 From: Poorna Krishnamoorthy Date: Tue, 15 Dec 2020 11:15:49 -0800 Subject: [PATCH] Ignore ObjectNotFound errors in delete api while enforcing locking (#11114) AWS does not report this or version not found as errors in the response. --- cmd/bucket-object-lock.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/bucket-object-lock.go b/cmd/bucket-object-lock.go index c5ea11989..07c96fef4 100644 --- a/cmd/bucket-object-lock.go +++ b/cmd/bucket-object-lock.go @@ -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) }