Skip to content

Commit 0aba249

Browse files
committed
Fix the handling of unavailable servers
See https://www.woltlab.com/community/thread/316319/
1 parent d91b0f9 commit 0aba249

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace wcf\system\package;
44

55
use GuzzleHttp\Exception\ClientException;
6+
use GuzzleHttp\Exception\ServerException;
67
use GuzzleHttp\Psr7\Request;
78
use GuzzleHttp\RequestOptions;
89
use Psr\Http\Client\ClientExceptionInterface;
@@ -196,6 +197,10 @@ private function getPackageUpdateXML(PackageUpdateServer $updateServer)
196197
$e->getResponse()->getBody(),
197198
$updateServer,
198199
);
200+
} catch (ServerException $e) {
201+
throw new SystemException(
202+
WCF::getLanguage()->get('wcf.acp.package.update.error.listNotFound') . ' (' . $e->getResponse()->getStatusCode() . ')'
203+
);
199204
}
200205

201206
if ($response->getStatusCode() !== 200 && $response->getStatusCode() !== 304) {

0 commit comments

Comments
 (0)