]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: Do not log link reference exceptions as error 47048/head
authorJulius Härtl <jus@bitgrid.net>
Mon, 5 Aug 2024 16:01:48 +0000 (18:01 +0200)
committerJulius Härtl <jus@bitgrid.net>
Mon, 5 Aug 2024 20:04:44 +0000 (22:04 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
lib/public/Collaboration/Reference/LinkReferenceProvider.php

index a7f54d02c0492a1912c6100d8741efe9ac8d2386..9fffcd523f73d57862d09e1da92c78329244abca 100644 (file)
@@ -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]);
                        }
                }
        }