Repository navigation
fix(charts): return notFound for invalid catalog case IDs - #1384
Conversation
|
Deploying with
|
| 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 |
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
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. |
|
The deployment blocker came from the old branch configuration. This is now updated with main, keeping the original route guard.
|
When users navigate to URLs with malformed case IDs (such as
/charts/catalog/charts/159-shadcn-line-linear.md), the regex validation ingetChartsCatalogCasethrows an unhandled validation error that surfaces to Sentry.Add
if (!isChartsCatalogCaseId(params.caseId)) throw notFound()to the$caseIdroute loader before invoking the server function, matching the pattern already used incharts.catalog.collections.$collectionId.tsx.Fixes TANSTACK-COM-5AF
@sentry <feedback>: Autofix iterates on these changes@sentry stop iterating: Autofix stops iterating on this runThis PR was automatically generated by Sentry. You can adjust this setting at any time.