Skip to content

cfn: close response bodies on read errors - #645

Open
fallintoplace wants to merge 1 commit into
aws:mainfrom
fallintoplace:fix-cfn-response-body-close
Open

fallintoplace wants to merge 1 commit into
aws:mainfrom
fallintoplace:fix-cfn-response-body-close

Conversation

@fallintoplace

Copy link
Copy Markdown

What

  • Close CloudFormation response bodies after failed reads.

Why

  • A read error currently leaves the body open.

Implementation

  • Defer Close once the HTTP request succeeds.
  • Cover failed and partial reads, HTTP errors, and close errors.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter

codecov-commenter commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.06%. Comparing base (3fa202a) to head (211448a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #645      +/-   ##
==========================================
+ Coverage   82.99%   83.06%   +0.06%     
==========================================
  Files          36       36              
  Lines        1429     1429              
==========================================
+ Hits         1186     1187       +1     
+ Misses        240      239       -1     
  Partials        3        3              

☔ View full report in Codecov by Harness.
📢 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.

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.

2 participants