Browse Source

filer: reduce delete entry ErrNotFound logs (#5301)

pull/5308/head
Sébastien 10 months ago
committed by GitHub
parent
commit
c694cb4e7d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      weed/server/filer_server_handlers_write.go

8
weed/server/filer_server_handlers_write.go

@ -213,14 +213,12 @@ func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) {
err := fs.filer.DeleteEntryMetaAndData(context.Background(), util.FullPath(objectPath), isRecursive, ignoreRecursiveError, !skipChunkDeletion, false, nil)
if err != nil {
glog.V(1).Infoln("deleting", objectPath, ":", err.Error())
httpStatus := http.StatusInternalServerError
if err == filer_pb.ErrNotFound {
httpStatus = http.StatusNoContent
writeJsonQuiet(w, r, httpStatus, nil)
writeJsonQuiet(w, r, http.StatusNoContent, nil)
return
}
writeJsonError(w, r, httpStatus, err)
glog.V(1).Infoln("deleting", objectPath, ":", err.Error())
writeJsonError(w, r, http.StatusInternalServerError, err)
return
}

Loading…
Cancel
Save