We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7415ff commit 3ee9341Copy full SHA for 3ee9341
src/Middleware/HealthChecks.EntityFrameworkCore/src/DbContextHealthCheck.cs
@@ -41,7 +41,7 @@ public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context
41
42
return new HealthCheckResult(context.Registration.FailureStatus);
43
}
44
- catch (Exception exception)
+ catch (Exception exception) when (exception is not OperationCanceledException || !cancellationToken.IsCancellationRequested)
45
{
46
return HealthCheckResult.Unhealthy(exception.Message, exception);
47
0 commit comments