I've made a couple of tweaks to the application health route.
Rather than depending on Tailwind CDN, I've inlined the CSS.
Exceptions thrown by the DiagnosingHealth event will be captured and a health flag set. If debug mode is enabled, the error will be re-thrown. If debug mode is disabled, the error will be reported and the exception message passed down to the health page.
Based on this, the application health page will then show an error, rather than just outputting a '500 | Server Error' page as it would by default. This still throws a 500 server error so can be picked up by monitoring tools.
I hope you'll give this some consideration! Thanks.
Hi,
I've made a couple of tweaks to the application health route.
Rather than depending on Tailwind CDN, I've inlined the CSS.
Exceptions thrown by the DiagnosingHealth event will be captured and a health flag set. If debug mode is enabled, the error will be re-thrown. If debug mode is disabled, the error will be reported and the exception message passed down to the health page.
Based on this, the application health page will then show an error, rather than just outputting a '500 | Server Error' page as it would by default. This still throws a 500 server error so can be picked up by monitoring tools.
I hope you'll give this some consideration! Thanks.