Merge pull request #7660 from nextcloud/fix-7646
Also log exception for failed appstore request
This commit is contained in:
commit
d97341d986
|
@ -36,6 +36,7 @@ use OCP\Files\NotFoundException;
|
||||||
use OCP\Http\Client\IClientService;
|
use OCP\Http\Client\IClientService;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\ILogger;
|
use OCP\ILogger;
|
||||||
|
use OCP\Util;
|
||||||
|
|
||||||
abstract class Fetcher {
|
abstract class Fetcher {
|
||||||
const INVALIDATE_AFTER_SECONDS = 300;
|
const INVALIDATE_AFTER_SECONDS = 300;
|
||||||
|
@ -170,7 +171,7 @@ abstract class Fetcher {
|
||||||
$file->putContent(json_encode($responseJson));
|
$file->putContent(json_encode($responseJson));
|
||||||
return json_decode($file->getContent(), true)['data'];
|
return json_decode($file->getContent(), true)['data'];
|
||||||
} catch (ConnectException $e) {
|
} 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 [];
|
return [];
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return [];
|
return [];
|
||||||
|
|
Loading…
Reference in New Issue