Skip to content

feat: error handler improvements #1033

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 10 commits into from
Mar 15, 2022
Merged

feat: error handler improvements #1033

merged 10 commits into from
Mar 15, 2022

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Mar 14, 2022

No description provided.

@csviri csviri self-assigned this Mar 14, 2022
@csviri csviri force-pushed the error-handling-improvements branch from e268d73 to b15a63c Compare March 14, 2022 14:06
@csviri csviri linked an issue Mar 14, 2022 that may be closed by this pull request
}
});
} catch (Exception e) {
throw new IllegalStateException(e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why IllegalStateException?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed it to OperatorException.

try {
return execution.execute();
} catch (Exception e) {
throw new IllegalStateException(e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why throw an IllegalStateException here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed it to OperatorException.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The goal is to wrap it to a runtime exception (but not the RuntimeException), not sure what is the best approach.

@csviri csviri marked this pull request as ready for review March 14, 2022 16:54
@csviri csviri linked an issue Mar 15, 2022 that may be closed by this pull request
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 65 Code Smells

40.1% 40.1% Coverage
0.0% 0.0% Duplication

@csviri csviri merged commit 4056ba3 into next Mar 15, 2022
@csviri csviri deleted the error-handling-improvements branch March 15, 2022 17:04
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.

Possibility to tell which error to retry in ErrorStatusHandler ErrorStatusHandler should have access to the reconcile context
2 participants