Skip to content

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

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/charts-catalog-case-id-not-found
Open

sentry[bot] wants to merge 1 commit 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: e36a525

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 Updated (UTC)
❌ Deployment failed
View logs
tanstack-com e36a525 Oct 15 2026, 11:26 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
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 55b9c8a1-e1cc-4609-8078-d3376227d899

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.

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

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.

1 participant