Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output clean error page on health check route #53528

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

chrispage1
Copy link
Contributor

Hi,

I've made a couple of tweaks to the application health route.

  1. Rather than depending on Tailwind CDN, I've inlined the CSS.

  2. 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.

image

I hope you'll give this some consideration! Thanks.

@chrispage1 chrispage1 force-pushed the feature/inline-health-up branch from 6a41fa8 to f5018c1 Compare November 15, 2024 10:25
@chrispage1 chrispage1 changed the title Improvements to health route Output clean error page on health check route Nov 15, 2024
@chrispage1 chrispage1 force-pushed the feature/inline-health-up branch from f5018c1 to aa19b46 Compare November 15, 2024 10:26
Inline CSS rather than depending on CDN
@chrispage1 chrispage1 force-pushed the feature/inline-health-up branch from aa19b46 to 337cb26 Compare November 15, 2024 10:26
@taylorotwell
Copy link
Member

Can you revert the CDN changes?

@taylorotwell taylorotwell marked this pull request as draft November 15, 2024 14:43
@chrispage1
Copy link
Contributor Author

Hi @taylorotwell - I've made this change. Cheers.

@chrispage1 chrispage1 marked this pull request as ready for review November 15, 2024 18:53
@taylorotwell taylorotwell merged commit 9894eee into laravel:11.x Nov 18, 2024
31 checks passed
@chrispage1 chrispage1 deleted the feature/inline-health-up branch November 18, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants