What is Error Handling?
TL;DR
Built-in error boundary system in Frontend Accelerator using error.tsx files to gracefully handle runtime errors.
Error Handling in Frontend Accelerator uses error.tsx files to create automatic error boundaries for route segments.
'use client';
export default function Error({ error, reset }) {
return (
<div>
<h2>Something went wrong!</h2>
<button onClick={() => reset()}>Try again</button>
</div>
);
}
Features:
- Automatic error boundaries per route
- Graceful fallback UI
- Reset functionality to recover from errors
- Error logging integration
AI-friendly: Explicit error.tsx files make error handling predictable and easy to understand.