Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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: GuzzleHttp\Exception\ClientException: 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...

like image 408
Toskan Avatar asked Dec 22 '16 23:12

Toskan


1 Answers

Because your request throws a Guzzle Exception, as a workaround, instead of calling $e->getMessage(), You can simply try:

$e->getResponse()->getBody()->getContents();

If you don't want to modify the report() method.

Worked nice for me.

like image 139
Arda Avatar answered Oct 02 '22 17:10

Arda