diff --git a/src/Clients/AwsLambda/RequestException.php b/src/Clients/AwsLambda/RequestException.php index e91a32d..6daf9cf 100644 --- a/src/Clients/AwsLambda/RequestException.php +++ b/src/Clients/AwsLambda/RequestException.php @@ -30,7 +30,7 @@ protected function prepareMessage(Response $response) return is_null($summary) ? $message : $message .= ":\n{$summary}\n"; } - protected function getSummary(Response $response, $truncateAt = 120) + protected function getSummary(Response $response, $truncateAt = 10000) { $body = $response->getBody(); @@ -44,12 +44,12 @@ protected function getSummary(Response $response, $truncateAt = 120) return; } - $summary = $body->read($truncateAt); - $body->rewind(); if ($size > $truncateAt) { - $summary .= ' (truncated...)'; + $summary = substr($response->body(), 0, $truncateAt).' (truncated...)'; + } else { + $summary = $response->body(); } // Matches any printable character, including unicode characters: