Only include the exception message in 'UrlHelper::$fetch_last_error'.
Before this the stack trace was included, which is a bit much.
This commit is contained in:
parent
f0f22c23c5
commit
8ef2803b27
|
@ -391,12 +391,12 @@ class UrlHelper {
|
||||||
$response = $client->request($post_query ? 'POST' : 'GET', $url, $req_options);
|
$response = $client->request($post_query ? 'POST' : 'GET', $url, $req_options);
|
||||||
} catch (\LengthException $ex) {
|
} catch (\LengthException $ex) {
|
||||||
// Either 'Content-Length' indicated the download limit would be exceeded, or the transfer actually exceeded the download limit.
|
// 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->setAttribute('error', self::$fetch_last_error);
|
||||||
$span->end();
|
$span->end();
|
||||||
return false;
|
return false;
|
||||||
} catch (GuzzleHttp\Exception\GuzzleException $ex) {
|
} 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\RequestException) {
|
||||||
if ($ex instanceof GuzzleHttp\Exception\BadResponseException) {
|
if ($ex instanceof GuzzleHttp\Exception\BadResponseException) {
|
||||||
|
|
Loading…
Reference in New Issue