diff --git a/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go b/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go index 21c9b1d..5ddbe54 100644 --- a/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go +++ b/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go @@ -241,6 +241,12 @@ func (s *Service) queryFeed(feedURL string) (*gofeed.Feed, []gofeed.Item, error) fp := gofeed.NewParser() fp.Client = cachingClient feed, err := fp.ParseURL(feedURL) + // check for no items in addition to any returned errors as it appears some RSS feeds + // do not consistently return items. + if err == nil && len(feed.Items) == 0 { + err = errors.New("feed has 0 items") + } + if err != nil { f := s.Feeds[feedURL] f.IsFailing = true