mirror of
https://salsa.debian.org/mdosch/feed-to-muc.git
synced 2024-11-13 01:36:49 +01:00
Changed behaviour to not crash if the feed is unavailable.
This commit is contained in:
parent
a9c651cbb4
commit
8ce67a61e0
1 changed files with 4 additions and 1 deletions
|
@ -120,7 +120,10 @@ func getArticles(feedURL string, max int, noExcerpt bool) (string, error) {
|
|||
fp := gofeed.NewParser()
|
||||
feed, err := fp.ParseURL(feedURL)
|
||||
if err != nil {
|
||||
return "", err
|
||||
// Don't return an error, but log a message as the
|
||||
// bot should not crash when the feed is not available.
|
||||
log.Println(feedURL, ": Feed not available.")
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// If no publish date is offered try update date.
|
||||
|
|
Loading…
Reference in a new issue