Search code examples
asp.net-corehealth-check

HealthCheckUI (AspNetCore.Diagnostics.HealthChecks) Unexpected Character 'H' error


I'm having an issue with the AspNetCore HealthCheckUI.

I followed this example: https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks#healthcheckui

My UI is up and running and my services are up and running with a healthcheck that just returns a string "Healthy". And I think that's the root cause of the issue.

It looks like the UI is showing a "false" error because it's expecting JSON and seeing a string. And so it's throwing an "Unexpected character 'H'" error while parsing the response.

Is there a way to stop the healthcheckui from expecting json?

Is there a way have this AspNetCore HealthChecksUI package work with a Healthcheck that doesn't return JSON?

enter image description here


Solution

  • Found the closest thing I could find to an answer, which is basically change all my healthchecks to json :(

    https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/issues/440