Skip to content

Commit c52e16d

Browse files
Merge pull request #55493 from nextcloud/backport/55422/stable29
[stable29] fix(appstore): Also catch ClientException and ServerException
2 parents 734dea3 + 779b5da commit c52e16d

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;
@@ -110,7 +112,7 @@ protected function fetch($ETag, $content) {
110112
$client = $this->clientService->newClient();
111113
try {
112114
$response = $client->get($this->getEndpoint(), $options);
113-
} catch (ConnectException $e) {
115+
} catch (ConnectException|ClientException|ServerException $e) {
114116
$this->config->setAppValue('settings', 'appstore-fetcher-lastFailure', (string)time());
115117
throw $e;
116118
}

0 commit comments

Comments
 (0)