1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Do not log website without icon as warning

This commit is contained in:
Frédéric Guillot 2023-10-19 20:04:26 -07:00
parent 9fd2dfa680
commit 5ac3489ee5
2 changed files with 4 additions and 4 deletions

View file

@ -189,16 +189,16 @@ func (f *IconFinder) DownloadIcon(iconURL string) (*model.Icon, error) {
response, err := clt.Get()
if err != nil {
return nil, fmt.Errorf("icon: unable to download iconURL: %v", err)
return nil, fmt.Errorf("icon: unable to download icon %s: %v", iconURL, err)
}
if response.HasServerFailure() {
return nil, fmt.Errorf("icon: unable to download icon: status=%d", response.StatusCode)
return nil, fmt.Errorf("icon: unable to download icon %s: status=%d", iconURL, response.StatusCode)
}
body, err := io.ReadAll(response.Body)
if err != nil {
return nil, fmt.Errorf("icon: unable to read downloaded icon: %v", err)
return nil, fmt.Errorf("icon: unable to read downloaded icon from %s: %v", iconURL, err)
}
if len(body) == 0 {