https://github.com/encode/httpx/blob/50d337e807839c21e796fd8b01c67d8a672a9721/httpx/_dispatch/http2.py#L147-L155
IIRC, RFC defines 2 messages that may carry error_code:
- RST_STREAM - forcibly close 1 stream
- GOAWAY - close entire connection (gracefully or forcibly)
In addition, h2 might generate ResetStream event internally:
when the remote party has made a protocol error which only affects a single stream
I find it weird that there's only this one place where error_code is evaluated in the library 🤔
https://github.com/encode/httpx/blob/50d337e807839c21e796fd8b01c67d8a672a9721/httpx/_dispatch/http2.py#L147-L155
IIRC, RFC defines 2 messages that may carry
error_code:In addition,
h2might generateResetStreamevent internally:I find it weird that there's only this one place where
error_codeis evaluated in the library 🤔