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

onResponseReceived hook is not called when response is not read #4

Open
chaoyangnz opened this issue Apr 20, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@chaoyangnz
Copy link
Owner

chaoyangnz commented Apr 20, 2021

In Axios, it throws an error when status code is greater than 400 in stream mode, but the response is never read, which causes onResponseReceived is never called.

Although that is an expected behaviour, we should never do additional things when downstream caller is not going to do.

An enhancement may be:

  • can we detect the case, and peek the response when response is not actually read, so that onResponseReceived hook is triggerred.
@chaoyangnz chaoyangnz added the enhancement New feature or request label Apr 20, 2021
@chaoyangnz chaoyangnz changed the title onResponseReceived hook are not called when response is not read onResponseReceived hook is not called when response is not read Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant