Description
DoubtDesk has zero error.tsx error boundary files. When a runtime error occurs on any page (e.g., API failure, undefined variable), the user sees the default Next.js error page which is ugly and unhelpful. This breaks the user experience.
Current State
- No
app/error.tsx (root level)
- No
app/dashboard/error.tsx
- No
app/ask-ai/error.tsx
- No
app/rooms/error.tsx
Proposed Solution
Create error.tsx files with user-friendly error UI and a "Try Again" button.
Example (app/error.tsx):
'use client'
export default function Error({ error, reset }: { error: Error; reset: () => void }) {
return (
<div className="min-h-screen flex items-center justify-center">
<div className="text-center space-y-4">
<h2 className="text-2xl font-bold">Something went wrong!</h2>
<p className="text-gray-500">{error.message}</p>
<button onClick={reset} className="px-4 py-2 bg-blue-600 text-white rounded-lg">
Try Again
</button>
</div>
</div>
)
}
Acceptance Criteria
Labels
good first issue, beginner-friendly, frontend, gssoc'26, level:beginner, type:feature
Description
DoubtDesk has zero
error.tsxerror boundary files. When a runtime error occurs on any page (e.g., API failure, undefined variable), the user sees the default Next.js error page which is ugly and unhelpful. This breaks the user experience.Current State
app/error.tsx(root level)app/dashboard/error.tsxapp/ask-ai/error.tsxapp/rooms/error.tsxProposed Solution
Create
error.tsxfiles with user-friendly error UI and a "Try Again" button.Example (
app/error.tsx):Acceptance Criteria
app/error.tsxcreatedLabels
good first issue,beginner-friendly,frontend,gssoc'26,level:beginner,type:feature