mirror of
https://github.com/chylex/Nextcloud-News.git
synced 2025-04-09 10:15:44 +02:00
Catch network errors while fetching feed logos, fixes #1570
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
This commit is contained in:
parent
2d5cb25321
commit
9f3b63b5f9
@ -82,6 +82,7 @@
|
||||
* [Alwaysin](mailto:adrien@demma.fr)
|
||||
* [Andrea Boero](mailto:mail@tsumi.it)
|
||||
* [Andreas Demmelbauer](mailto:git@notice.at)
|
||||
* [Artem Lavrukhin](mailto:lavryha4590@gmail.com)
|
||||
* [Arthur Schiwon](mailto:blizzz@arthur-schiwon.de)
|
||||
* [Aurelien DAVID](mailto:aurelien.david@etu.unistra.fr)
|
||||
* [Aurelien DAVID](mailto:dav.aurelien@gmail.com)
|
||||
@ -113,6 +114,8 @@
|
||||
* [Frank Karlitschek](mailto:frank@owncloud.org)
|
||||
* [Freddo](mailto:f.falk@protonmail.com)
|
||||
* [Freddo3000](mailto:f.falk@protonmail.com)
|
||||
* [Greg](mailto:greg@toolstack.com)
|
||||
* [Hagen](mailto:derhagen@users.noreply.github.com)
|
||||
* [Hanzei](mailto:Hanzei@users.noreply.github.com)
|
||||
* [Hendrik Leppelsack](mailto:hendrik@leppelsack.de)
|
||||
* [Jasper Knockaert](mailto:jasper@knockaert.nl)
|
||||
|
@ -8,6 +8,7 @@ The format is almost based on [Keep a Changelog](https://keepachangelog.com/en/1
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
- Catch network errors while fetching feed logos. (#1570)
|
||||
|
||||
# Releases
|
||||
## [16.2.0] - 2021-11-03
|
||||
|
@ -20,6 +20,7 @@ use FeedIo\FeedInterface;
|
||||
use FeedIo\FeedIo;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Exception\ConnectException;
|
||||
|
||||
use Net_URL2;
|
||||
use OCP\IL10N;
|
||||
@ -376,14 +377,14 @@ class FeedFetcher implements IFeedFetcher
|
||||
'logo' => $favicon
|
||||
]
|
||||
);
|
||||
} catch (RequestException $e) {
|
||||
$this->logger->info(
|
||||
'An error occurred while trying to download the feed logo of {url}: {error}',
|
||||
[
|
||||
'url' => $url,
|
||||
'error' => $e->getResponse() ?? 'Unknown'
|
||||
]
|
||||
);
|
||||
} catch (RequestException | ConnectException $e) {
|
||||
$this->logger->info(
|
||||
'An error occurred while trying to download the feed logo of {url}: {error}',
|
||||
[
|
||||
'url' => $url,
|
||||
'error' => $e->getResponse() ?? 'Unknown'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$is_image = $downloaded && substr(mime_content_type($favicon_path), 0, 5) === "image";
|
||||
|
Loading…
Reference in New Issue
Block a user