Add helper to check for transient errors#537
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #537 +/- ##
=======================================
Coverage 79.58% 79.59%
=======================================
Files 28 28
Lines 11866 11869 +3
=======================================
+ Hits 9444 9447 +3
Misses 2422 2422 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
TingDaoK
reviewed
Dec 15, 2025
| #include <aws/http/private/hpack.h> | ||
| #include <aws/http/private/http_impl.h> | ||
| #include <aws/http/status_code.h> | ||
| #include <aws/io/io.h> |
Contributor
There was a problem hiding this comment.
you probably don't need this. As http.h already includes io.h, right?
| bool aws_http_error_code_is_transient(int error_code) { | ||
| switch (error_code) { | ||
| case AWS_ERROR_HTTP_CONNECTION_CLOSED: | ||
| case AWS_ERROR_HTTP_SERVER_CLOSED: |
Contributor
There was a problem hiding this comment.
consider adding AWS_ERROR_HTTP_PROXY_CONNECT_FAILED_RETRYABLE.
AWS_ERROR_HTTP_STREAM_MANAGER_CONNECTION_ACQUIRE_FAILURE is tricky that we basically throw this for everything failed to get the connection when using stream manager.
Let's add a TODO/notes, chat with Swift SDK team, and see how they retries and how much they can be benefit from this change.
6681fce to
10059de
Compare
TingDaoK
approved these changes
Dec 22, 2025
Comment on lines
+127
to
+128
| * Helper used downstream to check if the HTTP error codes can be classified | ||
| * as transient errors. |
748d487 to
6922e83
Compare
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:
Description of changes:
An extension of the IO implementation to check for error codes indicating a transient error.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.