withastro / astro · Issue No. 17392
Astro v7.0.7
Node v24.18.0
System Linux (x64)
Package Manager pnpm
Output static
Adapter @astrojs/node
Integrations @astrojs/react
@astrojs/mdx
@astrojs/sitemap
pagefind
No response
A prerendered dynamic endpoint works correctly for parameter combinations returned by getStaticPaths(). However, requesting a URL that matches the endpoint’s route pattern but contains parameters that were not returned by getStaticPaths() results in an HTTP 500 response.
The development server is not affected. The issue is reproducible when running the built application using astro preview.
The reproduction contains:
Both routes define john as a valid name parameter in getStaticPaths() and return HTTP 200 for that value.
When requesting an undefined value:
This appears to affect prerendered dynamic endpoints, including both JSON and XML endpoints.
When a request matches a prerendered dynamic endpoint but uses parameters that were not returned by getStaticPaths(), the server should return HTTP 404.
This should behave consistently with prerendered dynamic pages, which already return HTTP 404 for unknown parameter combinations, rather than returning HTTP 500.
https://stackblitz.com/edit/github-wysncy63
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.