Don't log the stack trace for ConnectException

The stack trace for ConnectException could contain the old apps.json content and is probably huge.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2019-12-08 18:16:45 +01:00
parent 2959487f71
commit dbb1eef446
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
1 changed files with 2 additions and 2 deletions

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 [];
}
}