mirror of
https://github.com/nextcloud/server.git
synced 2026-03-10 10:21:38 -04:00
fix(references): Do not log errors on 404 responses of opengraph image fetching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
0133e4209f
commit
7a0c2d879d
1 changed files with 3 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
|||
namespace OC\Collaboration\Reference;
|
||||
|
||||
use Fusonic\OpenGraph\Consumer;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\Psr7\LimitStream;
|
||||
use GuzzleHttp\Psr7\Utils;
|
||||
use OC\Security\RateLimiting\Exception\RateLimitExceededException;
|
||||
|
|
@ -167,6 +168,8 @@ class LinkReferenceProvider implements IReferenceProvider {
|
|||
$folder->newFile(md5($reference->getId()), $bodyStream->getContents());
|
||||
$reference->setImageUrl($this->urlGenerator->linkToRouteAbsolute('core.Reference.preview', ['referenceId' => md5($reference->getId())]));
|
||||
}
|
||||
} catch (GuzzleException $e) {
|
||||
$this->logger->info('Failed to fetch and store the open graph image for ' . $reference->getId(), ['exception' => $e]);
|
||||
} catch (\Throwable $e) {
|
||||
$this->logger->error('Failed to fetch and store the open graph image for ' . $reference->getId(), ['exception' => $e]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue