49 references to Unhealthy
Aspire.Hosting (2)
ExternalServiceBuilderExtensions.cs (2)
282
return HealthCheckResult.
Unhealthy
($"The URL '{urlValue}' from parameter '{_urlParameter.Name}' is invalid: {message}");
288
return HealthCheckResult.
Unhealthy
($"The URL '{uri}' from parameter '{_urlParameter.Name}' cannot be used for HTTP health checks because it has a non-HTTP scheme.");
Aspire.Hosting.Azure.AIFoundry (3)
FoundryLocalHealthCheck.cs (1)
15
return Task.FromResult(HealthCheckResult.
Unhealthy
("Foundry Local not running"));
LocalModelHealthCheck.cs (2)
15
return HealthCheckResult.
Unhealthy
("Model has not been loaded.");
22
return HealthCheckResult.
Unhealthy
("Model has not been loaded.");
Aspire.Hosting.GitHub.Models (6)
GitHubModelsHealthCheck.cs (6)
59
HttpStatusCode.Unauthorized => HealthCheckResult.
Unhealthy
("GitHub Models API key is invalid or has insufficient permissions"),
61
_ => HealthCheckResult.
Unhealthy
($"GitHub Models endpoint returned unexpected status code: {response.StatusCode}")
66
_result = HealthCheckResult.
Unhealthy
($"Failed to check GitHub Models endpoint: {ex.Message}", ex);
86
return HealthCheckResult.
Unhealthy
($"GitHub Models: {message}");
94
return HealthCheckResult.
Unhealthy
($"GitHub Models: {errorResponse.Error.Message}");
101
return HealthCheckResult.
Unhealthy
($"GitHub Models returned an unsupported response: ({response.StatusCode}) {errorResponse?.Error?.Message}");
Aspire.Hosting.Nats (1)
src\Components\Aspire.NATS.Net\NatsHealthCheck.cs (1)
33
return HealthCheckResult.
Unhealthy
();
Aspire.Hosting.OpenAI (14)
OpenAIModelHealthCheck.cs (6)
50
HttpStatusCode.Unauthorized => HealthCheckResult.
Unhealthy
("OpenAI API key is invalid"),
52
HttpStatusCode.TooManyRequests => HealthCheckResult.
Unhealthy
("OpenAI API rate limit exceeded"),
53
_ => HealthCheckResult.
Unhealthy
($"OpenAI endpoint returned unexpected status code: {response.StatusCode}")
58
_result = HealthCheckResult.
Unhealthy
($"Failed to check OpenAI endpoint: {ex.Message}", ex);
78
return HealthCheckResult.
Unhealthy
($"OpenAI: {message}");
85
return HealthCheckResult.
Unhealthy
($"OpenAI returned an unsupported response: ({response.StatusCode}) {errorResponse?.Error?.Message}");
StatusPageHealthCheck.cs (8)
58
return HealthCheckResult.
Unhealthy
($"StatusPage request timed out after {_timeout.TotalSeconds:0.#}s.", oce);
62
return HealthCheckResult.
Unhealthy
("StatusPage request failed.", ex);
67
return HealthCheckResult.
Unhealthy
($"StatusPage returned {(int)resp.StatusCode} {resp.ReasonPhrase}.");
82
return HealthCheckResult.
Unhealthy
("Missing 'status' object in StatusPage response.");
105
"major" => HealthCheckResult.
Unhealthy
(description.Length > 0 ? description : "Major service outage."),
106
"critical" => HealthCheckResult.
Unhealthy
(description.Length > 0 ? description : "Critical service outage."),
107
_ => HealthCheckResult.
Unhealthy
($"Unknown indicator '{indicator}'", data: data)
112
return HealthCheckResult.
Unhealthy
("Failed to parse StatusPage JSON.", jex);
Aspire.Hosting.Tests (4)
DistributedApplicationTests.cs (1)
119
testProgram.AppBuilder.Services.AddHealthChecks().AddCheck("dummy_healthcheck", () => HealthCheckResult.
Unhealthy
());
Health\ResourceHealthCheckServiceTests.cs (3)
254
return HealthCheckResult.
Unhealthy
();
300
return HealthCheckResult.
Unhealthy
();
404
var checkStatus = HealthCheckResult.
Unhealthy
();
Aspire.NATS.Net (1)
NatsHealthCheck.cs (1)
33
return HealthCheckResult.
Unhealthy
();
Aspire.Seq (1)
SeqHealthCheck.cs (1)
26
: HealthCheckResult.
Unhealthy
();
CatalogDb (2)
CatalogDbInitializerHealthCheck.cs (2)
14
{ IsFaulted: true } => Task.FromResult(HealthCheckResult.
Unhealthy
(task.Exception?.InnerException?.Message, task.Exception)),
15
{ IsCanceled: true } => Task.FromResult(HealthCheckResult.
Unhealthy
("Database initialization was canceled")),
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (4)
HealthCheckMiddlewareTests.cs (4)
238
.AddAsyncCheck("Bar", () => Task.FromResult(HealthCheckResult.
Unhealthy
("Pretty bad.")))
317
.AddAsyncCheck("Bar", () => Task.FromResult(HealthCheckResult.
Unhealthy
("Pretty bad.")))
354
.AddAsyncCheck("Bar", () => Task.FromResult(HealthCheckResult.
Unhealthy
("Pretty bad.")))
492
.AddAsyncCheck("Bar", () => Task.FromResult(HealthCheckResult.
Unhealthy
("A-ok!")))
Microsoft.Extensions.Diagnostics.HealthChecks.Common (5)
ApplicationLifecycleHealthCheck.cs (3)
17
private static readonly Task<HealthCheckResult> _unhealthyNotStarted = Task.FromResult(HealthCheckResult.
Unhealthy
("Not Started"));
18
private static readonly Task<HealthCheckResult> _unhealthyStopping = Task.FromResult(HealthCheckResult.
Unhealthy
("Stopping"));
19
private static readonly Task<HealthCheckResult> _unhealthyStopped = Task.FromResult(HealthCheckResult.
Unhealthy
("Stopped"));
CommonHealthChecksExtensions.Manual.cs (1)
53
=> Throw.IfNull(manualHealthCheck).Result = HealthCheckResult.
Unhealthy
(Throw.IfNullOrWhitespace(reason));
ManualHealthCheck.cs (1)
38
Result = HealthCheckResult.
Unhealthy
("Initial state");
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (1)
ManualHealthCheckTests.cs (1)
65
var unhealthyCheck = HealthCheckResult.
Unhealthy
("Test reason");
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (5)
DefaultHealthCheckServiceTest.cs (4)
76
b.AddAsyncCheck("UnhealthyCheck", _ => Task.FromResult(HealthCheckResult.
Unhealthy
(UnhealthyMessage, exception)), unhealthyCheckTags);
179
b.AddAsyncCheck("UnhealthyCheck", _ => Task.FromResult(HealthCheckResult.
Unhealthy
(UnhealthyMessage, exception)));
257
return HealthCheckResult.
Unhealthy
();
690
return Task.FromResult(HealthCheckResult.
Unhealthy
("failed", e));
DependencyInjection\HealthChecksBuilderTest.cs (1)
186
return Task.FromResult(HealthCheckResult.
Unhealthy
());