mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
ignore all feeds with 4xx and 5xx errors
This commit is contained in:
parent
f27d0c4cd7
commit
e24b905adc
@ -270,8 +270,8 @@ func listItems(f storage.Feed, db *storage.Storage) ([]storage.Item, error) {
|
||||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
if res.StatusCode == 404 {
|
||||
errmsg := fmt.Sprintf("Failed to list feed items for %s (status: 404)", f.FeedLink)
|
||||
if res.StatusCode / 100 == 4 || res.StatusCode / 100 == 5 {
|
||||
errmsg := fmt.Sprintf("Failed to list feed items for %s (status: %d)", f.FeedLink, res.StatusCode)
|
||||
return nil, errors.New(errmsg)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user