Skip to content

Commit 29832a3

Browse files
Merge pull request #55422 from nextcloud/fix/noid/catch-appstore-exceptions
2 parents 9222716 + 31b8d36 commit 29832a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/private/App/AppStore/Fetcher/Fetcher.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
*/
77
namespace OC\App\AppStore\Fetcher;
88

9+
use GuzzleHttp\Exception\ClientException;
910
use GuzzleHttp\Exception\ConnectException;
11+
use GuzzleHttp\Exception\ServerException;
1012
use OC\Files\AppData\Factory;
1113
use OCP\AppFramework\Http;
1214
use OCP\AppFramework\Utility\ITimeFactory;
@@ -88,7 +90,7 @@ protected function fetch($ETag, $content, $allowUnstable = false) {
8890
$client = $this->clientService->newClient();
8991
try {
9092
$response = $client->get($this->getEndpoint(), $options);
91-
} catch (ConnectException $e) {
93+
} catch (ConnectException|ClientException|ServerException $e) {
9294
$this->config->setAppValue('settings', 'appstore-fetcher-lastFailure', (string)time());
9395
$this->logger->error('Failed to connect to the app store', ['exception' => $e]);
9496
return [];

0 commit comments

Comments
 (0)