From 5bae91c9cab311900437e1c9246f2fec8fae90b9 Mon Sep 17 00:00:00 2001 From: bake Date: Sat, 2 May 2020 14:42:05 +0200 Subject: [PATCH] Fix add missing error return --- feed/feed.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/feed/feed.go b/feed/feed.go index f4c6ff1..0738efd 100644 --- a/feed/feed.go +++ b/feed/feed.go @@ -9,6 +9,7 @@ import ( "time" "github.com/mmcdole/gofeed" + "github.com/pkg/errors" ) type Feed struct { @@ -48,6 +49,9 @@ func NewParser(c *http.Client) *Parser { func (p *Parser) ParseURL(url string) (*Feed, error) { f, err := p.Parser.ParseURL(url) + if err != nil { + return nil, errors.Wrap(err, "could not parse feed") + } items := make([]*Item, len(f.Items)) for i, item := range f.Items { items[i] = &Item{Item: item, Feed: f}