infusionsoft / infusionsoft-php

PHP client library for the Infusionsoft API.
https://developer.infusionsoft.com/
Other
130 stars 128 forks source link

Guzzle Exception Changes #293

Closed TWithers closed 4 months ago

TWithers commented 2 years ago

Newer versions of Guzzle will throw a BadResponseException if there is an issue with the server response. They also now throw a ConnectException if there are troubles connecting (timeout, curl, etc).

If you are targeting PHP 7.1+, you could use a union catch catch (BadResponseException | ConnectException $e) but if the target is just PHP 7, then you can use the TransferException as both BadResponseException and ConnectException extend it.

TWithers commented 4 months ago

Looks like this was implemented recently.