Minio.AspNetCore
Minio.AspNetCore copied to clipboard
If misconfigured, the health check should report as unhealthy instead of failing with HTTP 500 error
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.