Skip to content

fix(charts): return notFound for invalid catalog case IDs - #1384

Merged
tannerlinsley merged 2 commits into
mainfrom
seer/fix/charts-catalog-case-id-not-found
Nov 5, 2026
Merged

tannerlinsley merged 2 commits into
mainfrom
seer/fix/charts-catalog-case-id-not-found

Conversation

@sentry

@sentry sentry Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

When users navigate to URLs with malformed case IDs (such as /charts/catalog/charts/159-shadcn-line-linear.md), the regex validation in getChartsCatalogCase throws an unhandled validation error that surfaces to Sentry.

Add if (!isChartsCatalogCaseId(params.caseId)) throw notFound() to the $caseId route loader before invoking the server function, matching the pattern already used in charts.catalog.collections.$collectionId.tsx.

Fixes TANSTACK-COM-5AF

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

@changeset-bot

changeset-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 460b529

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 15, 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 Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 460b529 Commit Preview URL

Branch Preview URL
Nov 05 2026, 08:56 PM

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

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

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b573d80c-f9df-4c2a-882f-caa098bfa91c

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

@tannerlinsley

Copy link
Copy Markdown
Member

I verified this guard in a credential-free local app at e36a525. The reported /charts/catalog/charts/159-shadcn-line-linear.md URL and an uppercase ID both return HTTP 404. Removing the guard in the disposable fixture restores HTTP 500 for the reported URL; restoring it returns 404 again. The shared validator also agrees with the server schema on five invalid and three valid ID controls. This does not cover loading a valid catalog detail page end to end. The Cloudflare check is still failing, so I am leaving this open until that deployment gate is resolved.

@tannerlinsley

Copy link
Copy Markdown
Member

The deployment blocker came from the old branch configuration. This is now updated with main, keeping the original route guard.

AI review notes:
Cloudflare build 3aa68dad compiled successfully, then failed during versions upload with code 10061 because its StreamObject binding was no longer configured. Current main removes that obsolete binding. No Cloudflare settings were changed.
The normal commit hook passed TypeScript, lint, unit, chat and desktop tests on 460b529. The diff against main remains the original two-line guard. New-head CI and preview verification are pending.

@tannerlinsley
tannerlinsley merged commit e195e30 into main Nov 5, 2026
8 checks passed
@tannerlinsley
tannerlinsley deleted the seer/fix/charts-catalog-case-id-not-found branch November 5, 2026 21:08
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