feat(error): add h2_go_away_reason() to expose GOAWAY reason code#4052
feat(error): add h2_go_away_reason() to expose GOAWAY reason code#4052edef1c wants to merge 1 commit intohyperium:masterfrom
Conversation
Add a public method on Error that lets callers distinguish h2 GOAWAY rejections from other h2 errors. Returns the GOAWAY reason as Option<u32>, avoiding leaking h2::Reason into hyper's public API. This unblocks tonic and other middleware from implementing transparent retry of GOAWAY-rejected streams per RFC 9113 §6.8.
|
Fair goal. I've been thinking about how reqwest currently peeks at the source I've wondered, one option could be to just add an Or another option is to finally get around to designing #2845. I'd very much like that, but it's a bigger piece of conceptual design work. |
|
I'm specifically exposing the error code so tonic can retry in A complication is that hyperium/tonic@master...edef1c:tonic:push-rosuyzxnysvw also depends on being able to recognise DispatchGone, but that should presumably count as a NACK as well, since we know the request hasn't been dispatched. |
|
I wouldn't expect |
Add a public method on Error that lets callers distinguish h2 GOAWAY rejections from other h2 errors. Returns the GOAWAY reason as Option, avoiding leaking h2::Reason into hyper's public API.
This unblocks tonic and other middleware from implementing transparent retry of GOAWAY-rejected streams per RFC 9113 §6.8.