mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:40:16 +00:00
Use CurlResult for failed HTTPRequests (legacy usage)
This commit is contained in:
parent
dee1899628
commit
89f718ec72
1 changed files with 1 additions and 1 deletions
|
@ -224,7 +224,7 @@ class HTTPRequest implements IHTTPRequest
|
||||||
if ($exception->hasResponse()) {
|
if ($exception->hasResponse()) {
|
||||||
return new GuzzleResponse($exception->getResponse(), $url, $exception->getCode(), $exception->getMessage());
|
return new GuzzleResponse($exception->getResponse(), $url, $exception->getCode(), $exception->getMessage());
|
||||||
} else {
|
} else {
|
||||||
return new GuzzleResponse(null, $url, $exception->getCode(), $exception->getMessage());
|
return new CurlResult($url, '', ['http_code' => $exception->getCode()], $exception->getCode(), $exception->getMessage());
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
$this->profiler->stopRecording();
|
$this->profiler->stopRecording();
|
||||||
|
|
Loading…
Reference in a new issue