Revert "Remove unnecessary exception message (avoid log flooding)"
authorPhilipp <admin@philipp.info>
Sun, 11 Oct 2020 21:25:19 +0000 (23:25 +0200)
committerPhilipp <admin@philipp.info>
Sun, 11 Oct 2020 21:25:19 +0000 (23:25 +0200)
This reverts commit 8c718515

src/Network/HTTPRequest.php

index c37db4c..d85932e 100644 (file)
@@ -215,9 +215,9 @@ class HTTPRequest implements IHTTPRequest
                } catch (TransferException $exception) {
                        if ($exception instanceof RequestException &&
                                $exception->hasResponse()) {
-                               return new GuzzleResponse($exception->getResponse(), $url, $exception->getCode(), '');
+                               return new GuzzleResponse($exception->getResponse(), $url, $exception->getCode(), $exception->getMessage());
                        } else {
-                               return new CurlResult($url, '', ['http_code' => $exception->getCode()], $exception->getCode(), '');
+                               return new CurlResult($url, '', ['http_code' => $exception->getCode()], $exception->getCode(), $exception->getMessage());
                        }
                } finally {
                        $this->profiler->saveTimestamp($stamp1, 'network');