Fix getStaticPaths error in one route blocking other matching routes in dev#17189
Merged
Conversation
…tching other routes in dev\n\nWhen multiple routes match a URL pattern in dev mode, an error thrown by one\nroute's getStaticPaths() would immediately propagate, preventing other valid\ncandidate routes from being tried. Now the error is stored and the loop\ncontinues; the error is only re-thrown after all candidates are exhausted.\n\nFixes #9819
1 task
🦋 Changeset detectedLatest commit: f123b9d The changes in this PR will be included in the next version bump. This PR includes changesets to release 392 packages
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 |
matthewp
approved these changes
Jun 24, 2026
Merged
dadezzz
pushed a commit
to dadezzz/university_notes
that referenced
this pull request
Jun 30, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`7.0.2` → `7.0.3`](https://renovatebot.com/diffs/npm/astro/7.0.2/7.0.3) |  |  | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v7.0.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#703) [Compare Source](https://github.com/withastro/astro/compare/astro@7.0.2...astro@7.0.3) ##### Patch Changes - [#​17189](withastro/astro#17189) [`24d2c9e`](withastro/astro@24d2c9e) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes a bug where an error thrown inside one route's `getStaticPaths()` would prevent other valid routes from being matched in dev mode - [#​16932](withastro/astro#16932) [`8f4a3db`](withastro/astro@8f4a3db) Thanks [@​fkatsuhiro](https://github.com/fkatsuhiro)! - Fixes HMR for action files during development. Editing files in `src/actions/` now takes effect on the next request without requiring a dev server restart. - [#​17087](withastro/astro#17087) [`fb0ab02`](withastro/astro@fb0ab02) Thanks [@​jp-knj](https://github.com/jp-knj)! - Fixes localized custom error pages in i18n projects so routes like `/pt/404` are used for missing localized pages and return the correct status code </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzQuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI0Ni4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
getStaticPaths()no longer prevents other candidate routes from being tried. Previously, any non-routing error was immediately re-thrown, causing valid sibling routes to return a 500 instead of their correct response.Closes #9819
Testing
packages/astro/test/units/routing/dev-match-fallthrough.test.tswith two cases: one verifying that route B is matched when route A'sgetStaticPathsthrows, and one verifying the error is still re-thrown when no valid alternative exists.Docs