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.
In Axios, it throws an error when status code is greater than 400 in stream mode, but the response is never read, which causes
onResponseReceivedis 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: