Skip to content

Commit 1728d02

Browse files
Merge pull request #55492 from nextcloud/backport/55422/stable30
[stable30] fix(appstore): Also catch ClientException and ServerException
2 parents 920c0ee + a2c2fda commit 1728d02

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;
@@ -86,7 +88,7 @@ protected function fetch($ETag, $content) {
8688
$client = $this->clientService->newClient();
8789
try {
8890
$response = $client->get($this->getEndpoint(), $options);
89-
} catch (ConnectException $e) {
91+
} catch (ConnectException|ClientException|ServerException $e) {
9092
$this->config->setAppValue('settings', 'appstore-fetcher-lastFailure', (string) time());
9193
$this->logger->error('Failed to connect to the app store', ['exception' => $e]);
9294
return [];

0 commit comments

Comments
 (0)