Skip to content

chore(react-router): silence AbortError in renderRouterToStream#7627

Merged
Sheraff merged 1 commit into
mainfrom
chore-react-router-silence-abort-error-render-router-to-stream
Jun 13, 2026
Merged

chore(react-router): silence AbortError in renderRouterToStream#7627
Sheraff merged 1 commit into
mainfrom
chore-react-router-silence-abort-error-render-router-to-stream

Conversation

@Sheraff

@Sheraff Sheraff commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Server-side rendering no longer logs expected abort/disconnect errors to the console, providing cleaner output during normal operation while maintaining full error handling capabilities.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c6d69a98-b823-49ea-a37b-bd7155ad2d32

📥 Commits

Reviewing files that changed from the base of the PR and between 36ed574 and 24eea4a.

📒 Files selected for processing (2)
  • .changeset/upset-eagles-happen.md
  • packages/react-router/src/ssr/renderRouterToStream.tsx

📝 Walkthrough

Walkthrough

This PR silences AbortError logging in SSR stream rendering. A new isAbortError helper identifies abort/disconnect scenarios, and both renderToReadableStream and renderToPipeableStream error handlers conditionally suppress console errors for those cases, allowing abort plumbing to proceed without noise.

Changes

Abort Error Suppression

Layer / File(s) Summary
Abort error detection helper
packages/react-router/src/ssr/renderRouterToStream.tsx
Introduces isAbortError(request, error) predicate that checks request signal abort state and error name to classify abort-related errors.
Error handler updates for both streaming functions
packages/react-router/src/ssr/renderRouterToStream.tsx
renderToReadableStream and renderToPipeableStream onError callbacks now suppress console.error for abort errors while preserving logs for other failures.
Release notes documentation
.changeset/upset-eagles-happen.md
Changesets entry declares patch release and notes that AbortError is silenced in renderRouterToStream as expected behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A stream once cried when users left,
But rabbits know—that's not a theft!
Just abort signals, clean and bright,
Now silenced logs make all things right. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the main change: silencing AbortError in renderRouterToStream, which is confirmed by the file summary showing an isAbortError helper added to suppress abort errors in the handlers.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore-react-router-silence-abort-error-render-router-to-stream

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

@nx-cloud

nx-cloud Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 24eea4a

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 11m 40s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2m 12s View ↗

☁️ Nx Cloud last updated this comment at 2026-06-13 17:23:30 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

3 package(s) bumped directly, 10 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/react-router 1.170.15 → 1.170.16 Changeset
@tanstack/solid-router 1.170.15 → 1.170.16 Changeset
@tanstack/start-server-core 1.169.14 → 1.169.15 Changeset
@tanstack/react-start 1.168.25 → 1.168.26 Dependent
@tanstack/react-start-client 1.168.13 → 1.168.14 Dependent
@tanstack/react-start-rsc 0.1.24 → 0.1.25 Dependent
@tanstack/react-start-server 1.167.19 → 1.167.20 Dependent
@tanstack/solid-start 1.168.25 → 1.168.26 Dependent
@tanstack/solid-start-client 1.168.13 → 1.168.14 Dependent
@tanstack/solid-start-server 1.167.19 → 1.167.20 Dependent
@tanstack/start-plugin-core 1.171.17 → 1.171.18 Dependent
@tanstack/vue-start 1.168.24 → 1.168.25 Dependent
@tanstack/vue-start-server 1.167.19 → 1.167.20 Dependent

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Benchmarks

  • Commit: 2fa58c2d2f81
  • Measured at: 2026-06-13T17:12:57.641Z
  • Baseline source: history:36ed57409a98
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Initial gzip Raw Brotli Trend
react-router.minimal 87.29 KiB 0 B (0.00%) 87.15 KiB 273.66 KiB 75.88 KiB ▁▁▁▁▁▃█████
react-router.full 91.02 KiB 0 B (0.00%) 90.88 KiB 285.56 KiB 79.09 KiB ██▁▁▁▁▄▄▄▄▄
solid-router.minimal 35.48 KiB 0 B (0.00%) 35.36 KiB 105.86 KiB 32.03 KiB ▆▆▆█▁▁▁▁▁▁▁
solid-router.full 40.53 KiB 0 B (0.00%) 40.41 KiB 121.08 KiB 36.46 KiB ▆▆▆█▁▁▁▁▁▁▁
vue-router.minimal 52.97 KiB 0 B (0.00%) 52.84 KiB 149.90 KiB 47.62 KiB ███▁▁▁▁▁▁▁▁
vue-router.full 58.96 KiB 0 B (0.00%) 58.83 KiB 168.66 KiB 52.87 KiB ▁▁▁████████
react-start.minimal 101.91 KiB 0 B (0.00%) 101.77 KiB 321.98 KiB 88.21 KiB ▁▁▁▂▂▃█████
react-start.deferred-hydration 102.65 KiB 0 B (0.00%) 101.80 KiB 323.36 KiB 88.90 KiB ▁▁▂▂▂▂█████
react-start.full 105.31 KiB 0 B (0.00%) 105.18 KiB 331.91 KiB 91.06 KiB ██▁▁▁▂▆▆▆▆▆
react-start.rsbuild.minimal 99.63 KiB 0 B (0.00%) 99.46 KiB 316.43 KiB 85.79 KiB ▃▃▁▂▂▃█████
react-start.rsbuild.minimal-iife 100.03 KiB 0 B (0.00%) 99.87 KiB 317.37 KiB 86.08 KiB ▃▃▁▂▂▃█████
react-start.rsbuild.full 102.86 KiB 0 B (0.00%) 102.68 KiB 326.48 KiB 88.53 KiB ██▁▁▁▁▅▅▅▅▅
solid-start.minimal 49.60 KiB 0 B (0.00%) 49.47 KiB 151.93 KiB 43.79 KiB ▆▆▆█▁▁▁▁▁▁▁
solid-start.deferred-hydration 52.86 KiB 0 B (0.00%) 49.53 KiB 159.97 KiB 46.81 KiB ▄▄▄█▁▁▁▁▁▁▁
solid-start.full 55.40 KiB 0 B (0.00%) 55.27 KiB 168.97 KiB 48.80 KiB ▅▅▅█▁▁▁▁▁▁▁
vue-start.minimal 71.02 KiB 0 B (0.00%) 70.89 KiB 207.04 KiB 62.93 KiB ▁▁▁████████
vue-start.full 75.01 KiB 0 B (0.00%) 74.88 KiB 219.68 KiB 66.40 KiB ▁▁▁████████

Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better.

@pkg-pr-new

pkg-pr-new Bot commented Jun 13, 2026

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@7627

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7627

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@7627

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@7627

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7627

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@7627

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@7627

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7627

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@7627

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@7627

@tanstack/react-start-rsc

npm i https://pkg.pr.new/@tanstack/react-start-rsc@7627

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@7627

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@7627

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@7627

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@7627

@tanstack/router-devtools-core

npm i https://pkg.pr.new/@tanstack/router-devtools-core@7627

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@7627

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@7627

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7627

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@7627

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7627

@tanstack/solid-router

npm i https://pkg.pr.new/@tanstack/solid-router@7627

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7627

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7627

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@7627

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@7627

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@7627

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@7627

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7627

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@7627

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@7627

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7627

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@7627

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@7627

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7627

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@7627

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7627

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7627

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@7627

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@7627

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@7627

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@7627

commit: 24eea4a

@Sheraff Sheraff merged commit 689c5ab into main Jun 13, 2026
19 checks passed
@Sheraff Sheraff deleted the chore-react-router-silence-abort-error-render-router-to-stream branch June 13, 2026 17:41
@codspeed-hq

codspeed-hq Bot commented Jun 13, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 3.34%

❌ 1 regressed benchmark
✅ 95 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation ssr streaming deferred (react) 70.6 ms 73 ms -3.34%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing chore-react-router-silence-abort-error-render-router-to-stream (24eea4a) with main (36ed574)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant