mirror of
https://github.com/chylex/Nextcloud-News.git
synced 2025-04-25 20:15:47 +02:00
Smarter error logging
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de> Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
This commit is contained in:
parent
74586396f8
commit
137af71bb3
@ -377,22 +377,13 @@ class FeedFetcher implements IFeedFetcher
|
||||
]
|
||||
);
|
||||
} catch (RequestException $e) {
|
||||
if ($e->hasResponse()) {
|
||||
$this->logger->info(
|
||||
'An error occurred while trying to download the feed logo of {url}: {error}',
|
||||
[
|
||||
'url' => $url,
|
||||
'error' => $e->getResponse()
|
||||
'error' => $e->getResponse() ?? 'Unknown'
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->logger->info(
|
||||
'An unknown error occurred while trying to download the feed logo of {url}.',
|
||||
[
|
||||
'url' => $url,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$is_image = $downloaded && substr(mime_content_type($favicon_path), 0, 5) === "image";
|
||||
|
Loading…
Reference in New Issue
Block a user