Merge pull request #39795 from nextcloud/backport/39780/stable27

[stable27] log imaginary errors as info to not spam the server logs
This commit is contained in:
Simon L 2023-08-10 15:35:39 +02:00 committed by GitHub
commit 6d07a29f18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,14 +147,14 @@ class Imaginary extends ProviderV2 {
'connect_timeout' => 3,
]);
} catch (\Exception $e) {
$this->logger->error('Imaginary preview generation failed: ' . $e->getMessage(), [
$this->logger->info('Imaginary preview generation failed: ' . $e->getMessage(), [
'exception' => $e,
]);
return null;
}
if ($response->getStatusCode() !== 200) {
$this->logger->error('Imaginary preview generation failed: ' . json_decode($response->getBody())['message']);
$this->logger->info('Imaginary preview generation failed: ' . json_decode($response->getBody())['message']);
return null;
}