diff --git a/.kiro/specs/ultimate-lists-app/tasks.md b/.kiro/specs/ultimate-lists-app/tasks.md
index 3f94799..24bd1d5 100644
--- a/.kiro/specs/ultimate-lists-app/tasks.md
+++ b/.kiro/specs/ultimate-lists-app/tasks.md
@@ -199,7 +199,7 @@
- Implement skeleton loaders
- _Requirements: 7.3_
-- [ ] 16. Implement error handling
+- [-] 16. Implement error handling
- Add try-catch blocks to all server actions
- Implement error boundaries in React components
- Add user-friendly error messages
diff --git a/app/error.tsx b/app/error.tsx
new file mode 100644
index 0000000..a4906a4
--- /dev/null
+++ b/app/error.tsx
@@ -0,0 +1,46 @@
+'use client'
+
+import { useEffect } from 'react'
+import { AlertTriangle } from 'lucide-react'
+
+export default function Error({
+ error,
+ reset,
+}: {
+ error: Error & { digest?: string }
+ reset: () => void
+}) {
+ useEffect(() => {
+ console.error('Page error:', error)
+ }, [error])
+
+ return (
+
+
+
+
+ Something went wrong
+
+
+ {error.message || 'We encountered an unexpected error. Please try again.'}
+
+
+
+
+
+
+
+ )
+}
diff --git a/app/global-error.tsx b/app/global-error.tsx
new file mode 100644
index 0000000..0cfc06f
--- /dev/null
+++ b/app/global-error.tsx
@@ -0,0 +1,50 @@
+'use client'
+
+import { useEffect } from 'react'
+import { AlertTriangle } from 'lucide-react'
+
+export default function GlobalError({
+ error,
+ reset,
+}: {
+ error: Error & { digest?: string }
+ reset: () => void
+}) {
+ useEffect(() => {
+ console.error('Global error:', error)
+ }, [error])
+
+ return (
+
+
+
+
+
+
+ Application Error
+
+
+ A critical error occurred. Please refresh the page or contact support if the problem persists.
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/app/layout.tsx b/app/layout.tsx
index 6f98ef1..ab65a07 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -3,6 +3,7 @@ import './globals.css'
import ServiceWorkerRegistration from '@/components/ServiceWorkerRegistration'
import OfflineIndicator from '@/components/OfflineIndicator'
import { ToastProvider } from '@/components/ToastContainer'
+import ErrorBoundary from '@/components/ErrorBoundary'
export const metadata: Metadata = {
title: 'Ultimate Lists',
@@ -68,11 +69,13 @@ export default function RootLayout({
-
-
-
- {children}
-
+
+
+
+
+ {children}
+
+