Fix in case of the website is unreachable

This commit is contained in:
Beu 2022-04-18 22:34:21 +02:00
parent 818efaa756
commit 0efa58f298

View File

@ -118,6 +118,7 @@ class AsyncHttpRequest implements UsageInformationAble {
$request->addListener('complete', function (Event $event) { $request->addListener('complete', function (Event $event) {
$error = null; $error = null;
$content = null; $content = null;
$headers = null;
if ($event->response->hasError()) { if ($event->response->hasError()) {
$error = $event->response->getError()->getMessage(); $error = $event->response->getError()->getMessage();
} else { } else {