don't return on status filter errors, these are usually transient

This commit is contained in:
kim 2025-04-08 22:04:43 +01:00
commit c6df3f610d
6 changed files with 41 additions and 49 deletions

View file

@ -24,6 +24,7 @@ import (
statusfilter "github.com/superseriousbusiness/gotosocial/internal/filter/status"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/log"
"github.com/superseriousbusiness/gotosocial/internal/paging"
)
@ -87,11 +88,14 @@ func (p *Processor) publicTimelineGet(
// Pre-filtering function,
// i.e. filter before caching.
func(s *gtsmodel.Status) (bool, error) {
func(s *gtsmodel.Status) bool {
// Check the visibility of passed status to requesting user.
ok, err := p.visFilter.StatusPublicTimelineable(ctx, requester, s)
return !ok, err
if err != nil {
log.Errorf(ctx, "error filtering status %s: %v", s.URI, err)
}
return !ok
},
)
}
@ -136,11 +140,14 @@ func (p *Processor) localTimelineGet(
// Filtering function,
// i.e. filter before caching.
func(s *gtsmodel.Status) (bool, error) {
func(s *gtsmodel.Status) bool {
// Check the visibility of passed status to requesting user.
ok, err := p.visFilter.StatusPublicTimelineable(ctx, requester, s)
return !ok, err
if err != nil {
log.Errorf(ctx, "error filtering status %s: %v", s.URI, err)
}
return !ok
},
)
}