Skip to content

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

Closed
gonzoblasco wants to merge 6 commits into
TanStack:mainfrom
gonzoblasco:fix/serverFnFetcher-console-7873
Closed

gonzoblasco wants to merge 6 commits 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.
    • This provides cleaner error reporting while preserving existing behavior for unexpected failures.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: cef9d0c9-7cd8-4437-ab0b-a073170d4629

📥 Commits

Reviewing files that changed from the base of the PR and between edeb199 and 256d0fa.

📒 Files selected for processing (1)
  • packages/start-client-core/src/client-rpc/serverFnFetcher.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/start-client-core/src/client-rpc/serverFnFetcher.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 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.

Priority: ➖ Normal

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

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 256d0

Cancelled server-function requests no longer produce AbortError console noise, while callers still receive the rejected error. No merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the bug, motivation, and implementation. It does not include the required Changes, Checklist, or Release Impact sections, and it does not state testing or changeset status. Add the template sections. Describe the changes under Changes, complete the Checklist including testing status, and state whether a changeset is required under Release Impact.
Linked Issues check ⚠️ Warning The change skips logging for DOMException errors named AbortError and preserves rethrowing. However, other non-Response errors remain unconditionally logged, and CancelledError handling is not added. … Remove logging for all rethrown errors, or gate diagnostic logging appropriately and exclude all supported cancellation errors, including AbortError and CancelledError.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the change: skipping console.log for AbortError in serverFnFetcher.
Out of Scope Changes check ✅ Passed The change is limited to serverFnFetcher error handling and directly relates to the linked issue. No unrelated changes are shown.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Full details: Linked Issues check

Explanation

The change skips logging for DOMException errors named AbortError and preserves rethrowing. However, other non-Response errors remain unconditionally logged, and CancelledError handling is not added. Therefore, the broader issue objective is not fully addressed [7873].

✨ 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.

@gonzoblasco

Copy link
Copy Markdown
Author

Hey, just bumping this one - it's a small fix skipping a noisy console.log for AbortError. Would appreciate a maintainer review when you have a moment.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@gonzoblasco

Copy link
Copy Markdown
Author

Closing as superseded - current main no longer logs this error at all.

#8204 (cbbfbe37, merged 2026-09-16) removed the console.log(error) from getResponse entirely, so it now rethrows non-Response errors without logging. That fully covers this PR's intent, and the broader ask in #7873, which makes the AbortError guard redundant.

The branch conflicts with main for exactly that reason: the guarded line no longer exists. Rebased onto current main, the change would be empty, so there is nothing left to merge here.

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