Skip to content

Map HTTP/2 body INTERNAL_ERROR to RemoteError - #236

Open
samuel-williams-shopify wants to merge 1 commit into
mainfrom
map-http2-body-remote-error
Open

Map HTTP/2 body INTERNAL_ERROR to RemoteError#236
samuel-williams-shopify wants to merge 1 commit into
mainfrom
map-http2-body-remote-error

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Summary

  • map an HTTP/2 stream INTERNAL_ERROR raised while reading a response body to Protocol::HTTP::RemoteError
  • preserve the original Protocol::HTTP2::StreamError as the implicit exception cause
  • add coverage for the headers-then-reset ordering reported in the issue

This complements the pre-response mapping added in #232. Once response headers have resolved readiness, a later reset surfaces from the body and cannot safely be retried inside Async::HTTP::Client. Normalizing it as RemoteError lets integrations apply their own retry policy.

Testing

  • focused HTTP/2 regression: 4 tests, 20 assertions
  • RuboCop: 128 files, no offenses
  • full suite: 243 passed, 3 skipped; one unrelated live-network test errored and reproduced independently as ECONNRESET during SSL_connect

Fixes #231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP/2: server RST_STREAM with INTERNAL_ERROR isn't covered by the existing retry mechanism

2 participants