2

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

JBoothUA
  • 3,040
  • 3
  • 17
  • 46
  • 1
    Hi, how is your code like? Here is a sample you could follow:https://sahansera.dev/aspdotnet-core-health-checks/ – Rena Jul 29 '22 at 06:05
  • Thank you @Rena. I will go through your website and see if I can find anything. I also updated my question, my code looks exactly like this example: https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks#healthcheckui – JBoothUA Jul 29 '22 at 15:36
  • @Rena i pulled down the code from your website and unfortunately they are using JSON responses also – JBoothUA Jul 29 '22 at 16:41
  • but thanks for finding that article, let me know if you find any more :) – JBoothUA Jul 29 '22 at 22:49
  • @Rena i will definitely be putting a bounty on this tomorrow just in case you still want to help me :) thank youuuu! – JBoothUA Jul 30 '22 at 00:23

1 Answers1

1

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

JBoothUA
  • 3,040
  • 3
  • 17
  • 46