Skip to content

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

@chaoyangnz

Description

@chaoyangnz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions