-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Expertimental rewrite: when target page throws an error, this results in "404 Not Found" #11110
Copy link
Copy link
Closed
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)feat: routingRelated to Astro routing (scope)Related to Astro routing (scope)
Description
Astro Info
Astro v4.8.4
Node v20.13.1
System Linux (x64)
Package Manager unknown
Output server
Adapter @astrojs/node
Integrations @sentry/astro
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I tried using rewrites for an existing page and they work fine! However sometimes this existing page throws an error, and this case is not handled well.
Without rewrite, Astro developer tools show a nice UI for exceptions thrown in the standalone Node backend.
With rewrite, this doesn’t happen. First of all, any kind of error results in a 404 Not Found message. Second, this is not handled by Astro developer tools, so after followup changes I need to manually reload the page to see results.
What's the expected result?
Astro developer tools should handle the exception. The original exception should be shown, not "Not Found".
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-h5n839?file=src%2Fpages%2Findex.astro
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)feat: routingRelated to Astro routing (scope)Related to Astro routing (scope)