You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
catch(RequestFailedExceptionazureEx)when(azureEx.Status==404)// based on https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception
{
if(_options.CreateWhenNotFound)
{
// When this call fails, the exception is caught by upper layer.
// From https://learn.microsoft.com/aspnet/core/host-and-deploy/health-checks#create-health-checks:
// "If CheckHealthAsync throws an exception during the check, a new HealthReportEntry is returned with its HealthReportEntry.Status set to the FailureStatus."
Please, fill the following sections to help us fix the issue
What happened:
The keyvault we were health checking got "soft deleted", but the health check still returns "Healthy"
What you expected to happen:
I expect the health check should return "Unhealthy" in this case
How to reproduce it (as minimally and precisely as possible):
AzureKeyVaultSecretsHealthCheck
and check the healthSource code sample:
Anything else we need to know?:
AspNetCore.Diagnostics.HealthChecks/src/HealthChecks.Azure.KeyVault.Secrets/AzureKeyVaultSecretsHealthCheck.cs
Lines 48 to 59 in 65ab619
This code needs to change to also check for ErrorCode
VaultNotFound
.Environment:
The text was updated successfully, but these errors were encountered: