-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix: better DX for 500.astro in local development #11244
Conversation
🦋 Changeset detectedLatest commit: 10c0491 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
eb322ce
to
f73f190
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a changeset for this?
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Related docs PR withastro/docs#8495 |
Co-authored-by: Florian Lefebvre <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Don't forget to update the PR I linked, specifically the part about enabling in development
Changes
This PR enhance the usage of the
500.astro
page when rewriting.Before, in dev mode, we were not even displaying the custom
500.astro
, probably because we wanted to show the original error. However, this was causing more issues when using the rewriting, because users needed to rewrite using the500.astro
, and see the results.This PR catches the error in dev mode, and renders the custom 500 if present. I also logs the original error, because that won't be visible in the default
500.astro
Closes #11208
Testing
Added new test cases to test the custom
500.astro
and the default 500 page (none)Docs
N/A