Skip to content

Commit 50b6c66

Browse files
Merge pull request #55494 from nextcloud/backport/55422/stable28
[stable28] fix(appstore): Also catch ClientException and ServerException
2 parents 1dca441 + 6399c3a commit 50b6c66

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
@@ -30,7 +30,9 @@
3030
*/
3131
namespace OC\App\AppStore\Fetcher;
3232

33+
use GuzzleHttp\Exception\ClientException;
3334
use GuzzleHttp\Exception\ConnectException;
35+
use GuzzleHttp\Exception\ServerException;
3436
use OC\Files\AppData\Factory;
3537
use OCP\AppFramework\Http;
3638
use OCP\AppFramework\Utility\ITimeFactory;
@@ -123,7 +125,7 @@ protected function fetch($ETag, $content) {
123125
$client = $this->clientService->newClient();
124126
try {
125127
$response = $client->get($this->getEndpoint(), $options);
126-
} catch (ConnectException $e) {
128+
} catch (ConnectException|ClientException|ServerException $e) {
127129
$this->config->setAppValue('settings', 'appstore-fetcher-lastFailure', (string)time());
128130
throw $e;
129131
}

0 commit comments

Comments
 (0)