aspnet / Diagnostics

[Archived] Diagnostics middleware for reporting info and handling exceptions and errors in ASP.NET Core, and diagnosing Entity Framework Core migrations errors. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
213 stars 111 forks source link

Configuration of the health check option ResultStatusCodes #499

Closed guardrex closed 5 years ago

guardrex commented 5 years ago

Info request for the upcoming Health Checks doc topic.

HealthCheckOptions.ResultStatusCodes states ...

This property can be used to configure the status codes returned for each status.

... but it can't be set ... { get; } ...

https://github.com/aspnet/Diagnostics/blob/2.2.0-preview2/src/Microsoft.AspNetCore.Diagnostics.HealthChecks/HealthCheckOptions.cs#L29-L31

guardrex commented 5 years ago

Nevermind ... just found it ...

ResultStatusCodes =
{
    [HealthCheckStatus.Healthy] = 201,
},