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

If misconfigured, the health check should report as unhealthy instead of failing with HTTP 500 error #67

Open
Euphoric opened this issue Jun 6, 2023 · 0 comments

Comments

@Euphoric
Copy link

Euphoric commented Jun 6, 2023

Is your feature request related to a problem? Please describe.
If the configuration is not correct, eg. if configuration is missing. The MinioClient creation fails with exception. This is unhandled and results in health check call falling with 500 Internal server error.

Describe the solution you'd like
It should not fail and instead return unhealthy status.

Describe alternatives you've considered
Custom health check implementation.

Additional context
IMO in MinioHealthCheck class the MinioClient should not be constructor injected. And instead should be retrieved from DI in CheckHealthAsync method, so that it's creation is under the try/catch.

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

No branches or pull requests

1 participant