I make a Guzzle 6 request, and this request responses with a 401.
$client = new Client();
$response = $client->request('GET', ....
....
My Script will stop then and will return a error message.
GuzzleHttp \ Exception \ ClientException (401)
Client error: GET https://.....?lang=de
resulted in a 401 Unauthorized
response: Unauthorized
Try catch does not work.
How can I intercept the error message?
Thanks for help!