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

Apply/test custom req_error() handlers #17

Open
nealrichardson opened this issue Jan 1, 2022 · 0 comments
Open

Apply/test custom req_error() handlers #17

nealrichardson opened this issue Jan 1, 2022 · 0 comments

Comments

@nealrichardson
Copy link
Owner

The mock code path in req_perform() returns before applying any req_error() logic. This means that under the default behavior of httr2, a request that returns a 4xx response will error, but capture_requests() will record the response, and on replay in with_mock_api(), the 4xx response will be loaded and returned without error. It also means that any custom error handling a user/package may define won't get tested by mocks.

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

No branches or pull requests

1 participant