feat: add polished error handling pages (error, not-found, global-error)#6
Open
akhil05-g wants to merge 1 commit into
Open
feat: add polished error handling pages (error, not-found, global-error)#6akhil05-g wants to merge 1 commit into
akhil05-g wants to merge 1 commit into
Conversation
|
@Akhil200519 is attempting to deploy a commit to the redpangilinan's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add polished error handling pages
What this PR adds
Three new files under
src/app/to cover all Next.js 14 app router error surface areas:error.tsxnot-found.tsxnotFound()or unknown routesglobal-error.tsxlayout.tsxWhy it belongs in this template
The template is described as "ready to use — jump right into development." Error boundaries are a production requirement, not an afterthought — but Next.js does not scaffold them by default. Adding them here means every project started from this template has a safe, consistent error UX from day one.
Design decisions
error.tsxandnot-found.tsxuseshadcn/uicomponents (Button,Separator) and Tailwind classes so they inherit any theme customizations automatically.global-error.tsxuses inline styles intentionally — because it replaces the root layout entirely, Tailwind and the global CSS file are unavailable at that point.error.digestvalue is surfaced (when present) to aid debugging in production without exposing a raw stack trace.lucide-react, already a dependency ofshadcn/ui.Checklist
-TypeScript strict-compatible
src/app/)global-error.tsxcorrectly includes<html>and<body>per Next.js requirements