Merge pull request #18289 from nextcloud/bug/18203/dont-log-exception-on-connect-exception

Don't log the stack trace for ConnectException
This commit is contained in:
Roeland Jago Douma 2019-12-09 09:05:31 +01:00 committed by GitHub
commit 95ceff44a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,10 +174,10 @@ abstract class Fetcher {
$file->putContent(json_encode($responseJson));
return json_decode($file->getContent(), true)['data'];
} catch (ConnectException $e) {
$this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::INFO, 'message' => 'Could not connect to appstore']);
$this->logger->warning('Could not connect to appstore: ' . $e->getMessage(), ['app' => 'appstoreFetcher']);
return [];
} catch (\Exception $e) {
$this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::INFO]);
$this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::WARN]);
return [];
}
}