intuit / QuickBooks-V3-PHP-SDK

Official PHP SDK for QuickBooks REST API v3.0: https://developer.intuit.com/
Apache License 2.0
246 stars 246 forks source link

API errors via Guzzle should not throw exception #455

Closed kingIZZZY closed 10 months ago

kingIZZZY commented 2 years ago

When using the default cURL subsystem the response is correctly handled by the SDK Fault Handler for clients to consume as documented. But when using Guzzle subsystem by calling $dataService->setClientName('guzzle') it throws an exception by default for all HTTP 4xx and 5xx response codes, the SDK does not process it as a Fault Handler and the client cannot handle cases such as 401 Unauthorized to re-authenticate etc.

Guzzle should be configured to treat HTTP error responses same as all http responses, not throw exception.