252ef5fbe652b26cf84b968a5ca8dedb14e375a7

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Add channel URL to error message

Diff

 1diff --git a/feedparser/feedparser.go b/feedparser/feedparser.go
 2index eb55097e297ced2badfc928f568b4c3cd82bb086..a322638f9718ee399fa7965f3e92ff68aa0a2611 100644
 3--- a/feedparser/feedparser.go
 4+++ b/feedparser/feedparser.go
 5@@ -47,7 +47,7 @@ func (p *parser) fetch(url string) (io.ReadCloser, error) {
 6 	}
 7 
 8 	if response.StatusCode == http.StatusNotFound {
 9-		return nil, ErrInvalidChannelID
10+		return nil, fmt.Errorf("%w: %s", ErrInvalidChannelID, url)
11 	} else if response.StatusCode != http.StatusOK {
12 		return nil, fmt.Errorf("failed to get feed with status %d", response.StatusCode)
13 	}