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

Create custom error class and ensure consistent error handling/throwing. #557

Open
rjferguson21 opened this issue Jul 10, 2024 · 1 comment
Assignees
Labels
good first issue Good for newcomers operator Issues pertaining to the UDS Operator (Pepr) tech-debt 💳 Debt that the team has charged and needs to repay

Comments

@rjferguson21
Copy link
Contributor

The UDS Operator would benefit from more consistency related to Errors thrown. Ideally I think we would want to create a custom Error class which would allow us to:

  • have more consistency with how we log errors
  • classify the types of errors, perhaps indicating if an error is recoverable
  • link the exception to a particular component (perhaps leveraging newly added child logger components enum

We also need to ensure we are asserting that exceptions actually are Errors. Focus should be on the handleFailure function

@rjferguson21 rjferguson21 added operator Issues pertaining to the UDS Operator (Pepr) tech-debt 💳 Debt that the team has charged and needs to repay good first issue Good for newcomers labels Jul 10, 2024
@anthonywendt anthonywendt self-assigned this Jul 31, 2024
@rjferguson21
Copy link
Contributor Author

An example of a critical failure would be if this line throws an exception - https://github.com/defenseunicorns/uds-core/blob/main/src/pepr/operator/controllers/keycloak/client-sync.ts#L145C1-L145C5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers operator Issues pertaining to the UDS Operator (Pepr) tech-debt 💳 Debt that the team has charged and needs to repay
Projects
None yet
Development

No branches or pull requests

2 participants