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

chore(web): remove unused code from CleanupService #1841

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

kirangodishala
Copy link
Contributor

@kirangodishala kirangodishala commented Oct 28, 2024

While working on moving from RetrofitError to SpinnakerServerException(and its subclasses), found an unused method that has RetrofitError handling incorrectly done. This PR removes the method.

try {
swabbieService.restore(namespace, resourceId, "");
} catch (RetrofitError e) {
return Integer.toString(e.getResponse().getStatus());
Copy link
Contributor

Choose a reason for hiding this comment

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

For the record, some RetrofitErrors don't have responses (e.g. network errors and unexpected errors). This code generates a NullPointerException in those cases.

@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Oct 28, 2024
@mergify mergify bot added the auto merged label Oct 28, 2024
@mergify mergify bot merged commit bb10acf into spinnaker:master Oct 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants