recurly-client-php icon indicating copy to clipboard operation
recurly-client-php copied to clipboard

improvement: check response always, not only through makeRequest

Open SinusPi opened this issue 3 years ago • 0 comments

When performing makeRequest, request were undergoing proper validation, and could throw errors. In pagerCount, though, _getResponse was not followed by toResource, so it was not validated, even if the HEAD response had an erroneous status code.

This patch makes bad HEAD responses (like: invalid API key) throw errors just like any other response.

Requires my previous PR (validation of headers even in json-without-body case) to work properly.

SinusPi avatar Mar 14 '22 23:03 SinusPi