mirror of
https://github.com/nextcloud/server.git
synced 2026-02-19 02:38:40 -05:00
Merge pull request #55422 from nextcloud/fix/noid/catch-appstore-exceptions
This commit is contained in:
commit
29832a3608
1 changed files with 3 additions and 1 deletions
|
|
@ -6,7 +6,9 @@
|
|||
*/
|
||||
namespace OC\App\AppStore\Fetcher;
|
||||
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use GuzzleHttp\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\ServerException;
|
||||
use OC\Files\AppData\Factory;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
|
|
@ -88,7 +90,7 @@ abstract class Fetcher {
|
|||
$client = $this->clientService->newClient();
|
||||
try {
|
||||
$response = $client->get($this->getEndpoint(), $options);
|
||||
} catch (ConnectException $e) {
|
||||
} catch (ConnectException|ClientException|ServerException $e) {
|
||||
$this->config->setAppValue('settings', 'appstore-fetcher-lastFailure', (string)time());
|
||||
$this->logger->error('Failed to connect to the app store', ['exception' => $e]);
|
||||
return [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue