Skip to content

Add helper to check for transient errors#537

Merged
azkrishpy merged 8 commits into
mainfrom
transient-errors
Dec 22, 2025
Merged

Add helper to check for transient errors#537
azkrishpy merged 8 commits into
mainfrom
transient-errors

Conversation

@azkrishpy
Copy link
Copy Markdown
Contributor

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.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.59%. Comparing base (e464f85) to head (6922e83).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread source/http.c Outdated
#include <aws/http/private/hpack.h>
#include <aws/http/private/http_impl.h>
#include <aws/http/status_code.h>
#include <aws/io/io.h>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably don't need this. As http.h already includes io.h, right?

Comment thread source/http.c
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:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@TingDaoK TingDaoK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix&ship

Comment thread include/aws/http/http.h Outdated
Comment on lines +127 to +128
* Helper used downstream to check if the HTTP error codes can be classified
* as transient errors.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update it

@azkrishpy azkrishpy merged commit 1fbeb2e into main Dec 22, 2025
43 checks passed
@azkrishpy azkrishpy deleted the transient-errors branch December 22, 2025 22:34
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.

3 participants