-
Notifications
You must be signed in to change notification settings - Fork 219
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
Conversation
e268d73
to
b15a63c
Compare
...mework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/ErrorStatusHandler.java
Outdated
Show resolved
Hide resolved
} | ||
}); | ||
} catch (Exception e) { | ||
throw new IllegalStateException(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why IllegalStateException
?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to OperatorException
.
There was a problem hiding this comment.
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.
…tor/api/reconciler/ErrorStatusHandler.java Co-authored-by: Chris Laprun <[email protected]>
…r-sdk/java-operator-sdk into error-handling-improvements
Kudos, SonarCloud Quality Gate passed! |
No description provided.