Skip to content

fix(sentry): stop reporting expected notFound/redirect as errors - #1310

Open
sentry[bot] wants to merge 56 commits into
mainfrom
seer/fix/sentry-control-flow-errors
Open

sentry[bot] wants to merge 56 commits into
mainfrom
seer/fix/sentry-control-flow-errors

Conversation

@sentry

@sentry sentry Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

This PR addresses the issue of Sentry reporting expected TanStack Start control-flow signals (notFound() and redirect()) as unhandled errors.

Problem:
TanStack Start uses throw { isNotFound: true } and throw { isRedirect: true } as control-flow mechanisms to signal 404 states and redirects. Sentry's server-side middleware captures these thrown objects as genuine errors before the application code (e.g., loadDocs's catch block) can handle them. This results in a high volume of false positive error reports in Sentry, obscuring actual issues.

Solution:

  1. src/utils/sentry-redaction.ts:
    • Introduced isRouterControlFlow(value) to detect objects with isNotFound: true or isRedirect: true.
    • Created filterSentryEvent(event, hint) which returns null (to drop the event) if hint.originalException is a router control-flow object, otherwise it calls redactByokRequestHeaders(event).
  2. src/instrument.server.mjs:
    • Updated the Sentry beforeSend configuration to use the new filterSentryEvent.
  3. src/router.tsx:
    • Modified the client-side Sentry beforeSend to also check for isRouterControlFlow(hint?.originalException) and return null early for these events, while preserving existing redaction and ad-tech filtering logic.

This change ensures that Sentry only reports actual errors, improving the signal-to-noise ratio in our error monitoring.

Fixes TANSTACK-COM-4QS

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@sentry
sentry Bot requested a review from a team September 30, 2026 11:01
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 805010d3-70c7-4873-8ec9-d1e32525b399

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 3c6e2b5 Oct 14 2026, 05:37 PM

LadyBluenotes and others added 26 commits September 30, 2026 10:48
* docs: add Intent 0.5 release blog post

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update src/blog/intent-0.5-skills-you-can-maintain.md

Co-authored-by: LeCarbonator <18158911+LeCarbonator@users.noreply.github.com>

* Update src/blog/intent-0.5-skills-you-can-maintain.md

Co-authored-by: LeCarbonator <18158911+LeCarbonator@users.noreply.github.com>

* Update src/blog/intent-0.5-skills-you-can-maintain.md

Co-authored-by: LeCarbonator <18158911+LeCarbonator@users.noreply.github.com>

* Update src/blog/intent-0.5-skills-you-can-maintain.md

Co-authored-by: LeCarbonator <18158911+LeCarbonator@users.noreply.github.com>

* Update src/blog/intent-0.5-skills-you-can-maintain.md

Co-authored-by: LeCarbonator <18158911+LeCarbonator@users.noreply.github.com>

* Update src/blog/intent-0.5-skills-you-can-maintain.md

Co-authored-by: LeCarbonator <18158911+LeCarbonator@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: LeCarbonator <18158911+LeCarbonator@users.noreply.github.com>
* docs: publish TanStack Start security update

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix(builder): keep generated apps on current releases

* chore(builder): update creation engine
* Remove edge fade from tab rows

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Preserve tab borders with end-only fade

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add Scarf Bronze sponsorship and archive Electric

* feat: add Scarf partnership announcement

* docs: refine Scarf partnership announcement
* docs: clarify Markdown and Highlight landing pages

* Preserve informal landing voice and route writing skills

* Show Markdown and Highlight v1 docs in version picker

* Type version-route smoke test responses

* Use approved streaming landing copy

* Use approved conversational syntax heading

* Use approved syntax section description

* Use approved two-line Markdown safety heading

* Use approved Markdown safety description

* Keep two-line safety heading within narrow screens

* Use approved browser-parsing marketing copy

* Use approved highlighting integration and hero copy

* Use approved selective-language copy

* Use approved CSS theme marketing copy

* Use approved mixed-language section copy

* Use approved annotation wordplay and explanation

* Remove unnecessary Highlight performance marketing section

* Remove duplicated highlighter comparison section

* Use approved Markdown integration copy

* Use final approved integration flexibility wording
* feat: add invite-only TanChat alpha and retire Builder entry points

* Reduce shared chat bundle cost and finish regression fixes

* Use canonical conversation URLs and fix Linux desktop checks

* Format desktop folder helper for strict GCC checks

* Test device registration according to supported platforms
Improve TanChat access page and add an account waitlist
* Improve TanChat access page and add an account waitlist

* Make TanChat navigation immediate and reuse conversation reads
Fix admin table render loops and manage TanChat access
* Improve TanChat access page and add an account waitlist

* Make TanChat navigation immediate and reuse conversation reads

* Fix admin table render loops and manage TanChat access

* Hide the persistent Assistant from the conversation list
* Improve TanChat access page and add an account waitlist

* Make TanChat navigation immediate and reuse conversation reads

* Fix admin table render loops and manage TanChat access

* Hide the persistent Assistant from the conversation list

* Distinguish sending messages from checking send receipts
* Improve TanChat access page and add an account waitlist

* Make TanChat navigation immediate and reuse conversation reads

* Fix admin table render loops and manage TanChat access

* Hide the persistent Assistant from the conversation list

* Distinguish sending messages from checking send receipts

* Fix TanChat request lifetimes and message submission delays
* Improve TanChat access page and add an account waitlist

* Make TanChat navigation immediate and reuse conversation reads

* Fix admin table render loops and manage TanChat access

* Hide the persistent Assistant from the conversation list

* Distinguish sending messages from checking send receipts

* Fix TanChat request lifetimes and message submission delays

* Make local development work without service credentials
* Improve TanChat access page and add an account waitlist

* Make TanChat navigation immediate and reuse conversation reads

* Fix admin table render loops and manage TanChat access

* Hide the persistent Assistant from the conversation list

* Distinguish sending messages from checking send receipts

* Fix TanChat request lifetimes and message submission delays

* Make local development work without service credentials

* Fix session secret initialization during Worker startup
* feat(hotkeys): add Alpine, Ember, and Octane framework support

* chore: remove framework support metadata tests
* fix(chat): clear selected message when switching conversations

* fix(chat): exempt verified admins from included spending caps

* perf(chat): parallelize authorized response preparation

* perf(chat): show sends immediately and reduce response preparation
* perf(chat): shorten admission and model preparation

* perf(chat): configure production Hyperdrive connection pooling
perf(chat): decouple transcript publication and trace send phases
perf(chat): reserve usage and authorize admission in fewer round trips
* feat(pacer): Add missing framework options

* fix(docs): Read local directory manifests through the dev bridge

* chore(docs): Keep Pacer website PR scoped to frameworks
fix(partners): refresh CodeRabbit theme branding
tannerlinsley and others added 28 commits October 5, 2026 10:24
* perf(chat): reserve usage and authorize admission in fewer round trips

* fix(chat): keep transcript stable when sending
fix: order charts bundle comparison by size
* Replace Kapa with Algolia Agent Studio in the AI dock

The AI panel now streams answers from Algolia Agent Studio's AG-UI
completions endpoint via TanStack AI's useChat, replacing the Kapa SDK
and its reCAPTCHA integration. Sources are extracted from the agent's
Algolia search tool results, search activity renders inline in the
answer flow, and thumbs feedback posts to the Agent Studio feedback
endpoint.

* Drop AG-UI client workarounds fixed server-side

Agent Studio now tolerates vendor metadata on AG-UI messages and prunes
unresolved historical tool calls before provider replay
(algolia/conversational-ai#1629), so the outgoing-message sanitizer is
no longer needed.

* Point the AI dock at production Agent Studio

Swaps the staging agent for the production one now that AG-UI
compatibility mode and its message-tolerance fixes are deployed there.

* Address PR review: tool-result sources and feedback payload

Collect answer sources from sibling tool-result parts, which hydrated
threads use instead of inline tool-call output. Send the required
agentId with feedback votes and unlock the thumbs buttons when the
endpoint rejects a vote.

* Autolink bare URLs in AI answers

The agent emits bare URLs in prose, and CommonMark only autolinks URLs
wrapped in angle brackets. A markdown extension turns bare http(s) URLs
in text nodes into links, leaving code spans and existing links alone,
and long link labels now wrap cleanly inside the chat bubble.

* Address PR review: history reselect, reset errors, URL parens

- Selecting the history item that is already live is a no-op. The chat
  client keeps its messages when `threadId` does not change, so restoring
  the saved transcript as a prefix duplicated every answer.
- New Chat calls the SDK `clear()`. Changing `threadId` swaps the client
  and drops messages, but the error state survived and rendered under the
  empty conversation. `clear()` also cancels the in-flight stream, so the
  separate stop-then-clear path is gone.
- Bare URL autolinking keeps balanced parentheses (GFM rule), so
  `/routes/(auth)` links intact while `(see https://x/a)` still drops the
  wrapper. The transform moves to its own module with a unit test.
- `createThreadId` uses `crypto.randomUUID()` directly.

* Move attribution to dock header as TanStack AI × Algolia lockup

Message headers now only name the assistant (TanStack AI). The vendor
credit lives once in the dock header as a peer lockup with both marks,
instead of a per-message "TanStack powered by Algolia" line.

* Use brand wordmark and full Algolia logo in the AI dock header

The header now shows the TanStack AI wordmark (LibraryWordmark, linking
to /ai/latest) next to the full Algolia logo. Message bubbles no longer
carry a per-message header, since the dock header already identifies
the assistant.

* fix: search results bg opacity

---------

Co-authored-by: Paul Jankowski <8BitTitan@gmail.com>
Co-authored-by: Tom Beckenham <34339192+tombeckenham@users.noreply.github.com>
feat(charts): add layered interactive dot cloud hero
chore: upgrade Markdown and Highlight to 1.0
fix(charts): use radial text backdrop without canvas blur
Fix insecure site requests and docs cache binding lifetime
* Pass Start compat config to Vite without pnpm's `--`

pnpm forwards a literal `--` to the script, so `pnpm run dev -- --config
.tanstack/vite.config.mjs` ran `vite dev -- --config ...` and Vite ignored
the config. Only npm needs the separator.

Fixes #1353

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Clarify why only npm gets the `--` separator

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
Three landing callouts set `rounded-lg` together with `border-l-2`, so the
2px accent border was dragged around an 8px corner radius with no adjacent
border to continue into. The result is a bar that tapers and detaches at both
ends instead of reading as a flush accent rule.

Squares the bordered edge with `rounded-r-lg`, which is the idiom already used
correctly elsewhere in the codebase — Toc.tsx (`border-l-2 rounded-r`) and
HomeSectionFallbacks.tsx (`rounded-r-md border-l-2`).

A box should never carry a border on one side while rounding that side's
corners.

Audited the rest of the codebase for the same pattern: every other
radius + single-side-border pairing is either already squared on the bordered
edge, or joins two adjacent surfaces (`rounded-t-*` with `border-b-0`), or is
the spinner idiom (`rounded-full border-b-2`). These three were the only
violations.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* Draft TanStack Start 1.0 announcement with partner logo grids

* Apply spoken announcement edits and reuse homepage partner grid

* Address announcement review with clearer pacing and API example

* Clarify that the release candidate period has ended

* Recognize partner contributions by tier and link announcement references

* Set announcement date and credit Manuel and Florian
* Add Cloudflare-hosted Start launch video and poster

* Polish blog headers and Start launch video poster
fix: hide unavailable library discussions links
* fix: preserve blog headings and fenced code comments

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* docs: correct TanStack DB blog examples and sync claims

* docs: state guaranteed blog behavior directly

* docs: avoid repeated setup in DB blog example

* docs: revert copy edits and keep example fixes

* docs(db): fix load-more code example
* fix: read local docs directories through the worker bridge

* fix: allow local repository root directory reads
* fix: read local docs directories through the worker bridge

* fix(seo): canonicalize Markdown docs to HTML

* fix: allow local repository root directory reads
Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
@changeset-bot

changeset-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3c6e2b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tannerlinsley

Copy link
Copy Markdown
Member

Updated this against current main and replaced the property checks with Router’s isNotFound/isRedirect helpers. An actual redirect() result is a Response with options, so the old isRedirect === true check missed it. The regression uses real notFound()/redirect() values, keeps ordinary errors and HTTP 500 responses reportable, and checks that BYOK headers are still removed. Current server initialization settings are preserved. The full pnpm test suite and commit hooks passed: 550 unit tests passed with 4 skipped, 2269 chat tests passed, and 20 desktop tests passed with 1 skipped, plus type and lint checks. New CI is running on 3c6e2b5. The server instrumentation change still needs the required team review before merge.

This branch has not been deployed

No deployments
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.

8 participants