It seems that the issue I am facing is straightforward but somehow the resolutions suggested here, here, and here are not working
I have got the following piece of code:
namespace App\Traits;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
...
try {
$response = Http::timeout(3)->get('google.cim');
} catch (\Illuminate\Http\Client\ConnectionException $e) {
Log::info('Connection refused #6 ');
}
I have already tried
- Using
\Illuminate\Http\Client\ConnectionException $e
- Using
\Exception $e
- Clearing cache
php artisan optimize:clear
But I just see the exception in the logs while my custom message never appears in the log.
Thank you.