Skip to content
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

fix: improved error handling when update.k3s.io returns a 5XX or invalid response #1170

Merged
merged 3 commits into from
Feb 8, 2023

Conversation

nikhilsbhat
Copy link
Contributor

What

Better handling of http call made to update.k3s.io.
Update the way of handling the http client call for fetchLatestK3sVersion, to make it more testable.

Why

#1129

Implications

This will check the http status code to the calls made to update.k3s.io, and handle it accordingly.

Update the way of handling the http client call for fetchLatestK3sVersion, to make it more testable.
Copy link
Member

@iwilltry42 iwilltry42 left a comment

Choose a reason for hiding this comment

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

Looks good!

version/version_test.go Outdated Show resolved Hide resolved
version/version_test.go Outdated Show resolved Hide resolved
@iwilltry42 iwilltry42 self-assigned this Feb 8, 2023
@iwilltry42
Copy link
Member

Thank you for this contribution @nikhilsbhat ! 👍

@iwilltry42 iwilltry42 changed the title Fix for poor error message when update.k3s.io returns a 5XX fix: improved error handling when update.k3s.io returns a 5XX or invalid response Feb 8, 2023
@iwilltry42 iwilltry42 merged commit 6a5b731 into k3d-io:main Feb 8, 2023
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.

None yet

2 participants