diff --git a/src/Http/GuzzleRequest.php b/src/Http/GuzzleRequest.php index 355c3ce..6a68490 100644 --- a/src/Http/GuzzleRequest.php +++ b/src/Http/GuzzleRequest.php @@ -114,7 +114,11 @@ protected function parseErrorMessage(ClientException $guzzleException) }; } - return (string) $response->xml()->message; + try { + return (string)$response->xml()->message; + } catch (\Exception $ex) { + return 'Excpetion while processing error response. Error reason phrase: ' . $response->getReasonPhrase(); + } } /**