Revert "Use CurlResult for failed HTTPRequests (legacy usage)"
authorPhilipp <admin@philipp.info>
Sun, 11 Oct 2020 21:25:51 +0000 (23:25 +0200)
committerPhilipp <admin@philipp.info>
Sun, 11 Oct 2020 21:25:51 +0000 (23:25 +0200)
This reverts commit 1a42f35a

src/Network/HTTPRequest.php

index ffc095b..1ced5fc 100644 (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');