Use CurlResult for failed HTTPRequests (legacy usage)

pull/10619/head
Philipp 2021-08-20 19:48:16 +02:00
rodzic dee1899628
commit 89f718ec72
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 9A28B7D4FF5667BD
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -224,7 +224,7 @@ class HTTPRequest implements IHTTPRequest
if ($exception->hasResponse()) {
return new GuzzleResponse($exception->getResponse(), $url, $exception->getCode(), $exception->getMessage());
} else {
return new GuzzleResponse(null, $url, $exception->getCode(), $exception->getMessage());
return new CurlResult($url, '', ['http_code' => $exception->getCode()], $exception->getCode(), $exception->getMessage());
}
} finally {
$this->profiler->stopRecording();