Use CurlResult for failed HTTPRequests (legacy usage)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user