diff --git a/lib/Service/FeedServiceV2.php b/lib/Service/FeedServiceV2.php index 16ca9a60aa..4668e442ab 100644 --- a/lib/Service/FeedServiceV2.php +++ b/lib/Service/FeedServiceV2.php @@ -16,6 +16,7 @@ use DateTime; use FeedIo\Explorer; use FeedIo\Reader\ReadErrorException; +use FeedIo\Reader\NoAccurateParserException; use HTMLPurifier; use OCA\News\Db\FeedMapperV2; @@ -283,10 +284,17 @@ public function fetch(Entity $feed): Entity $feed->getBasicAuthPassword(), $feed->getHttpLastModified() ); - } catch (ReadErrorException $ex) { + } catch (ReadErrorException | NoAccurateParserException $ex) { $feed->setUpdateErrorCount($feed->getUpdateErrorCount() + 1); $feed->setLastUpdateError($ex->getMessage()); + $this->logger->warning( + 'Error while parsing feed: {url} {error}', + [ + 'url' => $location, + 'error' => $ex + ] + ); return $this->mapper->update($feed); }