Skip to content

fix(start-plugin-core): reject prerender when a page fails - #8747

Closed
maricastroc wants to merge 1 commit into
TanStack:mainfrom
maricastroc:fix/prerender-fail-on-error
Closed

maricastroc wants to merge 1 commit into
TanStack:mainfrom
maricastroc:fix/prerender-fail-on-error

Conversation

@maricastroc

@maricastroc maricastroc commented Oct 17, 2026 •

Copy link
Copy Markdown

With failOnError, a failed page was rethrown inside the prerender queue. The queue.add promises were never observed and Queue.start() only resolves, so prerender() resolved and the error escaped as an unhandled rejection that crashed the build process without closing the preview server.

Record the first failure, skip tasks that start after it, and rethrow it once the queue settles so prerender() rejects.

🎯 Changes

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with the relevant test commands, or tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

With `failOnError`, a failed page was rethrown inside the prerender
queue. The `queue.add` promises were never observed and
`Queue.start()` only resolves, so `prerender()` resolved and the error
escaped as an unhandled rejection that crashed the build process
without closing the preview server.

Record the first failure, skip tasks that start after it, and rethrow
it once the queue settles so `prerender()` rejects.
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@changeset-bot

changeset-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f132811

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@tanstack/start-plugin-core Patch
@tanstack/react-start-rsc Patch
@tanstack/react-start Patch
@tanstack/solid-start Patch
@tanstack/vue-start Patch

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

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.

1 participant