Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: check response always, not only through makeRequest #674

Open
wants to merge 7 commits into
base: v3-v2021-02-25
Choose a base branch
from

Conversation

SinusPi
Copy link

@SinusPi SinusPi commented Mar 14, 2022

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.

saas786 and others added 7 commits September 28, 2021 18:04
- Base client class now accepts Http Adapter object as param.
- Add http adapter interface
… into v3-v2021-02-25:

- Added HttpAdapterInterface
…/guzzle' into v3-v2021-02-25:"

This reverts commit e20809e, reversing
changes made to d62bdf2.
…t-Type: application/json" was received in header.
so that makeRequest AND pagerCount are validated.
… because toResource no longer throws errors - makeRequest does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants