modified internal/feed/fetcher.go +1 -1
| @@ -52,7 +52,7 @@ func (f *Fetcher) Fetch(ctx context.Context, feedURL, etag, lastModified string) |
| 52 | 52 | return nil, "", "", nil |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | | - if resp.StatusCode != http.StatusOK { |
| 55 | + if resp.StatusCode < 200 || resp.StatusCode >= 300 { |
| 56 | 56 | return nil, "", "", fmt.Errorf("unexpected status: %d", resp.StatusCode) |
| 57 | 57 | } |
| 58 | 58 | |
| @@ -52,7 +52,7 @@ func (f *Fetcher) Fetch(ctx context.Context, feedURL, etag, lastModified string) |
| 52 | return nil, "", "", nil | 52 | return nil, "", "", nil |
| 53 | } | 53 | } |
| 54 | | 54 | |
| 55 | - if resp.StatusCode != http.StatusOK { | 55 | + if resp.StatusCode < 200 || resp.StatusCode >= 300 { |
| 56 | return nil, "", "", fmt.Errorf("unexpected status: %d", resp.StatusCode) | 56 | return nil, "", "", fmt.Errorf("unexpected status: %d", resp.StatusCode) |
| 57 | } | 57 | } |
| 58 | | 58 | |