Browse Source

[filer] fix return 204 for DELETE on entry not found (#6023)

fix return 204 for DELETE on entry not found
pull/6032/head
Konstantin Lebedev 3 months ago
committed by GitHub
parent
commit
2b13d2c083
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      weed/server/filer_server_handlers_write.go

6
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) 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()) glog.V(1).Infoln("deleting", objectPath, ":", err.Error())
writeJsonError(w, r, http.StatusInternalServerError, err) writeJsonError(w, r, http.StatusInternalServerError, err)
return return

Loading…
Cancel
Save