Skip to content

Commit

Permalink
Fix getting errors from request
Browse files Browse the repository at this point in the history
  • Loading branch information
sidigi authored Apr 21, 2021
1 parent 1b441f5 commit 4d3fc57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Clients/AwsLambda/RequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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:
Expand Down

0 comments on commit 4d3fc57

Please sign in to comment.