Merge pull request #47048 from nextcloud/fix/log-link-reference-error

pull/40427/head
John Molakvoæ 2024-08-06 17:52:57 +07:00 committed by GitHub
commit bdf00f0870
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 5 deletions

@ -9,7 +9,6 @@ declare(strict_types=1);
namespace OCP\Collaboration\Reference;
use Fusonic\OpenGraph\Consumer;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Psr7\LimitStream;
use GuzzleHttp\Psr7\Utils;
use OC\Security\RateLimiting\Exception\RateLimitExceededException;
@ -186,10 +185,8 @@ class LinkReferenceProvider implements IReferenceProvider, IPublicReferenceProvi
$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]);
} catch (\Exception $e) {
$this->logger->debug('Failed to fetch and store the open graph image for ' . $reference->getId(), ['exception' => $e]);
}
}
}