Skip to content

fix(start-client-core): skip console.log for AbortError in serverFnFetcher (#7873) - #7878

Open
gonzoblasco wants to merge 1 commit into
TanStack:mainfrom
gonzoblasco:fix/serverFnFetcher-console-7873
Open

fix(start-client-core): skip console.log for AbortError in serverFnFetcher (#7873)#7878
gonzoblasco wants to merge 1 commit into
TanStack:mainfrom
gonzoblasco:fix/serverFnFetcher-console-7873

Conversation

@gonzoblasco

@gonzoblasco gonzoblasco commented Jul 22, 2026

Copy link
Copy Markdown

Fixes #7873

serverFnFetcher's getResponse was logging every non-Response error via console.log, including benign AbortErrors from cancelled requests. This spammed the browser console in both dev and production builds.

Added a guard that skips the console.log for DOMException with name === 'AbortError' — the caller deliberately aborted and will handle the rejection.

Summary by CodeRabbit

  • Bug Fixes
    • Improved request cancellation handling so intentionally aborted requests no longer generate unnecessary error logs.
    • Other request errors continue to be reported as before.

@coderabbitai

coderabbitai Bot commented Jul 22, 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: a23ff5eb-2546-40e3-809c-5f1f789e14b1

📥 Commits

Reviewing files that changed from the base of the PR and between 07ce903 and 0818f36.

📒 Files selected for processing (1)
  • packages/start-client-core/src/client-rpc/serverFnFetcher.ts

📝 Walkthrough

Walkthrough

getResponse now detects DOMException values named AbortError and rethrows them without logging. Other non-Response errors retain the existing logging and rethrow behavior.

Changes

Server function fetching

Layer / File(s) Summary
AbortError handling
packages/start-client-core/src/client-rpc/serverFnFetcher.ts
getResponse bypasses console.log for DOMException cancellations with name === 'AbortError', while other non-Response errors remain logged and rethrown.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR fixes AbortError logging, but it still logs other non-Response errors and does not address the broader unconditional logging issue. Also remove or gate the remaining non-Response logging in getResponse so rethrown errors do not spam production consoles.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: skipping console.log for AbortError in serverFnFetcher.
Out of Scope Changes check ✅ Passed The change is limited to the linked serverFnFetcher logging behavior and contains no clear unrelated edits.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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.

Start: serverFnFetcher unconditionally console.logs every server-function error, including benign cancellation AbortErrors

1 participant