Skip to content

[management/client/rest] fix panic when body is nil #3714

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
May 5, 2025

Conversation

mohamed-essam
Copy link
Collaborator

Describe your changes

Fixes panic occurring when body is nil (this usually happens when connections is refused) due to lack of nil check by centralizing response.Body.Close() behavior.

Issue ticket number and link

netbirdio/kubernetes-operator#21

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

@mohamed-essam mohamed-essam force-pushed the fix/management-rest-panic branch from 5e994e0 to 99f9cc0 Compare April 22, 2025 19:05
@mlsmaycon
Copy link
Collaborator

@mohamed-essam can you merge main into the branch?

@mohamed-essam mohamed-essam force-pushed the fix/management-rest-panic branch from 99f9cc0 to 818df8e Compare May 5, 2025 14:08
Copy link

sonarqubecloud bot commented May 5, 2025

@mlsmaycon mlsmaycon merged commit ac135ab into main May 5, 2025
35 checks passed
@mlsmaycon mlsmaycon deleted the fix/management-rest-panic branch May 5, 2025 16:54
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