Skip to content

refactor: http get request handling #2428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

tenthirtyam
Copy link
Contributor

Description

Improves error handling and resource management in the uploadOvaDisksFromURL function. The changes enhance the clarity of error messages and ensure proper cleanup of HTTP response resources.

Error handling improvements:

  • Enhanced error messages to include more context, such as the URL and specific errors encountered during the HTTP GET request and OVA data processing.

Resource management:

  • Added a defer resp.Body.Close() statement to ensure the HTTP response body is properly closed, preventing potential resource leaks.

Refactors the HTTP GET request handling for the content library helper to be more robust.

Signed-off-by: Ryan Johnson <[email protected]>
@tenthirtyam tenthirtyam added technical-debt Technical Debt area/content-library Area: Content Library refactor Refactor labels Apr 26, 2025
@tenthirtyam tenthirtyam added this to the v2.13.0 milestone Apr 26, 2025
@tenthirtyam tenthirtyam requested a review from spacegospod April 26, 2025 21:36
@tenthirtyam tenthirtyam self-assigned this Apr 26, 2025
@tenthirtyam tenthirtyam requested a review from a team as a code owner April 26, 2025 21:36
@tenthirtyam tenthirtyam added the needs-review Needs Review label Apr 27, 2025
@tenthirtyam tenthirtyam removed the needs-review Needs Review label Apr 29, 2025
@tenthirtyam tenthirtyam merged commit 8135fca into main Apr 29, 2025
8 checks passed
@tenthirtyam tenthirtyam deleted the refactor/http-get-request-handling branch April 29, 2025 19:50
Copy link

This functionality has been released in v2.13.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/content-library Area: Content Library refactor Refactor technical-debt Technical Debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants