Revert "Use CurlResult for failed HTTPRequests (legacy usage)"

This reverts commit 1a42f35a
This commit is contained in:
Philipp 2020-10-11 23:25:51 +02:00
parent 2e8ad098b9
commit 9536a0e39c
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD

View file

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