diff --git a/pkg/yurthub/filter/filter.go b/pkg/yurthub/filter/filter.go index 9a4e5133958..8a5dabbe8be 100644 --- a/pkg/yurthub/filter/filter.go +++ b/pkg/yurthub/filter/filter.go @@ -238,9 +238,12 @@ func (frc *filterReadCloser) StreamResponseFilter(rc io.ReadCloser, ch chan *byt return err } - newObj := frc.objectFilter.Filter(obj, frc.stopCh) - if yurtutil.IsNil(newObj) { - continue + newObj := obj + // BOOKMARK and ERROR response are unnecessary to filter + if !(watchType == watch.Bookmark || watchType == watch.Error) { + if newObj = frc.objectFilter.Filter(obj, frc.stopCh); yurtutil.IsNil(newObj) { + continue + } } wEvent := watch.Event{