fix(landing): graceful not-found handling for blog and library posts and authors#5661
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Author routes Reviewed by Cursor Bugbot for commit 3c29e20. Configure here. |
Greptile SummaryThis PR adds scoped not-found handling for landing content pages. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(landing): graceful not-found handlin..." | Re-trigger Greptile |
Summary
/blog/[slug]and/library/[slug]with an unknown slug now render section-scoped "Post not found" pages with a Browse CTA — the exact pattern integrations/models/comparisons already use (notFound()guard + section-localnot-found.tsx) — instead of falling through to the bare root "Page not found"getPostBySlugreturnsnullfor unknown slugs instead of throwing, removing a latent 500 (the throw was only masked bydynamicParams = false); both pages andgenerateMetadatanow guard/blog/authors/[id]and/library/authors/[id]with an unknown author now return a real 404 vianotFound()+ author-scopednot-found.tsx— previously they returned an indexable HTTP 200 soft-404ContentAuthorPage's now-dead inline "Author not found" fallback and madeauthorNamerequired — both consumers guard before renderingType of Change
Testing
Verified on a dev server: unknown post slugs 404, unknown authors render the author not-found screen, and real posts/authors are unaffected. Dev enforces
dynamicParams = falseas a root-level 404 (confirmed identical dev behavior for the existing integrations/models routes, which render their section not-found in production per staging), so production behavior matches the established sections. Typecheck and lint pass; allgetPostBySlugcall sites audited for null-safety.Checklist