Stop iterating response body on error for bidirectional streams#668
Closed
SamRemis wants to merge 1 commit intosmithy-lang:developfrom
Closed
Stop iterating response body on error for bidirectional streams#668SamRemis wants to merge 1 commit intosmithy-lang:developfrom
SamRemis wants to merge 1 commit intosmithy-lang:developfrom
Conversation
Contributor
Author
|
Note - the CRT team is aware of this issue and is working on it in tandem. Hopefully they fix this upstream and we can never merge this. |
Merged
Contributor
Author
|
Closing in favor of #672 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#657
Description of changes:
On bidirectional HTTP/2 streams, the CRT only signals response body completion when both sides of the stream have sent END_STREAM. When the server returns a non-2xx response (e.g., 429 ThrottlingException), the client side is still open sending events, so get_next_response_chunk() hangs forever waiting for a completion signal that never comes.
This PR updates the CRT HTTP client to break out of the chunks() loop after the first chunk when the response status is >= 400. The error body is already fully buffered by the CRT at that point, allowing the error to be deserialized and raised.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.