Also log exception for failed appstore request

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2018-01-02 09:40:03 +01:00
parent a2a4a5596d
commit c5f852d90c
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 2 additions and 1 deletions

View File

@ -36,6 +36,7 @@ use OCP\Files\NotFoundException;
use OCP\Http\Client\IClientService;
use OCP\IConfig;
use OCP\ILogger;
use OCP\Util;
abstract class Fetcher {
const INVALIDATE_AFTER_SECONDS = 300;
@ -170,7 +171,7 @@ abstract class Fetcher {
$file->putContent(json_encode($responseJson));
return json_decode($file->getContent(), true)['data'];
} catch (ConnectException $e) {
$this->logger->info('Could not connect to appstore', ['app' => 'appstoreFetcher']);
$this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => Util::INFO, 'message' => 'Could not connect to appstore']);
return [];
} catch (\Exception $e) {
return [];