mirror of https://github.com/minio/minio.git
Suppress error log for force-deleting object in locked bucket (#19378)
This commit is contained in:
parent
468a9fae83
commit
3f72439b8a
|
@ -2826,7 +2826,9 @@ func (api objectAPIHandlers) DeleteObjectHandler(w http.ResponseWriter, r *http.
|
|||
|
||||
rcfg, _ := globalBucketObjectLockSys.Get(bucket)
|
||||
if rcfg.LockEnabled && opts.DeletePrefix {
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, errors.New("force-delete is forbidden in a locked-enabled bucket")), r.URL)
|
||||
apiErr := toAPIError(ctx, errInvalidArgument)
|
||||
apiErr.Description = "force-delete is forbidden on Object Locking enabled buckets"
|
||||
writeErrorResponse(ctx, w, apiErr, r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue