Skip to content
Advertisement

error log truncated in laravel 5.3

i have this entry in my laravel 5.3 log

2016-12-22 17:23:37] local.ERROR: GuzzleHttpExceptionClientException: Client error: POST https://api.sparkpost.com/api/v1/transmissions resulted in a 400 Bad Request response: { “errors”: [ { “message”: “Message generation rejected”, “description”: “recipient address suppressed due to customer p (truncated…)

why does it truncate an important error message? now i cannot figure out what is going wrong…

Advertisement

Answer

The truncating is done by the Guzzle library. It only shows the first 120 characters of the response. I am assuming this is because responses could potentially be very long.

If you would like to see the full message, you should be able to customize how guzzle exceptions are handled.

Update the report() method in your app/Exceptions/Handler.php to something like:

JavaScript

Note: this is done in the report method, so it only affects what is written to the log. If the exception is dumped to the terminal or to the browser, it will still show the truncated message.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement