diff options
author | Andrew Dolgov <[email protected]> | 2024-01-13 18:27:19 +0000 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2024-01-13 18:27:19 +0000 |
commit | d334023267848accb339c8ec3186be2afde3b514 (patch) | |
tree | 90244088e9536ea21b1050d00fd916829ef79dcd /classes | |
parent | de214a01d2b443adf5efe187c324f17d7e5439bd (diff) | |
parent | 8ef2803b27e9aa67050db0896994c0a5f846a16d (diff) |
Merge branch 'feature/reduce-fetch-error-message' into 'master'
Only include the exception message in 'UrlHelper::$fetch_last_error'.
See merge request tt-rss/tt-rss!20
Diffstat (limited to 'classes')
-rw-r--r-- | classes/UrlHelper.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/UrlHelper.php b/classes/UrlHelper.php index 82b8bf36e..7c426bedf 100644 --- a/classes/UrlHelper.php +++ b/classes/UrlHelper.php @@ -391,12 +391,12 @@ class UrlHelper { $response = $client->request($post_query ? 'POST' : 'GET', $url, $req_options); } catch (\LengthException $ex) { // Either 'Content-Length' indicated the download limit would be exceeded, or the transfer actually exceeded the download limit. - self::$fetch_last_error = (string) $ex; + self::$fetch_last_error = $ex->getMessage(); $span->setAttribute('error', self::$fetch_last_error); $span->end(); return false; } catch (GuzzleHttp\Exception\GuzzleException $ex) { - self::$fetch_last_error = (string) $ex; + self::$fetch_last_error = $ex->getMessage(); if ($ex instanceof GuzzleHttp\Exception\RequestException) { if ($ex instanceof GuzzleHttp\Exception\BadResponseException) { |