From bae93e611d8cc323d1040ed2bf2f0b7466d28bfc Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Fri, 27 Sep 2024 19:15:54 +0500 Subject: [PATCH] [filer] avoid 500 if table doesn't exist (#6075) --- weed/filer/filerstore_wrapper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/filer/filerstore_wrapper.go b/weed/filer/filerstore_wrapper.go index 9c448edfd..ebaf04065 100644 --- a/weed/filer/filerstore_wrapper.go +++ b/weed/filer/filerstore_wrapper.go @@ -164,6 +164,9 @@ func (fsw *FilerStoreWrapper) FindEntry(ctx context.Context, fp util.FullPath) ( entry, err = actualStore.FindEntry(ctx, fp) // glog.V(4).Infof("FindEntry %s: %v", fp, err) if err != nil { + if fsw.CanDropWholeBucket() && strings.Contains(err.Error(), "Table") && strings.Contains(err.Error(), "doesn't exist") { + err = filer_pb.ErrNotFound + } return nil, err }