PocketStarter Docs

Error Handling

PocketStarter handles errors gracefully to provide a smooth user experience. There is built-in (user-friendly) error handling for different scenarios.

404 (Page not found)

When you try to visit a page that doesn't exist, a simple "Not found" page is shown.

You can customize the design in src/app/not-found.tsx.

Simple 404 page

A simple 'Not found' page for 404 errors

Runtime errors

The error.tsx component catches runtime errors and displays a user-friendly message. In development, you'll see the full error stack trace; in production, only a generic message is shown.

You can customize the design in src/app/error.tsx.

Simple error page

A simple error page for runtime errors

Custom Errors

In-app errors (such as login failures, custom validation, or expected application errors) are displayed using the alert.tsx component with three styles (default, destructive, success).

Error Handling and 404 Pages with PocketStarter