From 2b13d2c083a8cf2e1efc616e3301ce590c78cf11 Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:11:03 +0500 Subject: [PATCH] [filer] fix return 204 for DELETE on entry not found (#6023) fix return 204 for DELETE on entry not found --- weed/server/filer_server_handlers_write.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go index 4fc10c26c..e745f04f2 100644 --- a/weed/server/filer_server_handlers_write.go +++ b/weed/server/filer_server_handlers_write.go @@ -217,11 +217,7 @@ func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) { } err := fs.filer.DeleteEntryMetaAndData(context.Background(), util.FullPath(objectPath), isRecursive, ignoreRecursiveError, !skipChunkDeletion, false, nil, 0) - if err != nil { - if err == filer_pb.ErrNotFound { - writeJsonQuiet(w, r, http.StatusNoContent, nil) - return - } + if err != nil && err != filer_pb.ErrNotFound { glog.V(1).Infoln("deleting", objectPath, ":", err.Error()) writeJsonError(w, r, http.StatusInternalServerError, err) return