Try using the getBody() method on the response.
dd($response->getBody());
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Good evening,
sometimes I get an error message while calling on an API using Guzzle.
What drives me crraaaaaazzzyyy is the fact that the important part of the error message gets truncated! For Example:
exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `POST https://mws.amazonservices.de/[blablabla]` resulted in a `403 Forbidden` response:
<?xml version="1.0"?>
<ErrorResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
<Error>
(truncated...)
' in ....
I quickly found out about log_errors_max_len in my php.ini which I changed to 400, 99999 and even 0 - saved the file - restarted apache - phpinfo() confirms that the setting takes effect....BUT the message is still truncated!
I also deactivated all zend extensions to the best of my knowledge.
I even changed the Exception which is thrown to
} catch (\Exception $e) {
and I tried the same via console - all to no avail.
What am I missing? This freaks me out a bit because without the error message it is really hard to see what to fix :-)
Thanks Andreas
Please or to participate in this conversation.