Errors · component · 14K

System error

"Sorry, a system error occurred." as a React error boundary: bomb alert with ID = n (stable per error type), Restart and Resume, a details disclosure with the component stack, inline or covering the screen, reset keys and focus restore.

Errors from event handlers and promises are not caught by React; pass them to useThrowToBoundary. For a Next.js app/error.tsx, render SystemErrorAlert variant="screen" with systemErrorId(error) and call retry on Restart (see the comment at the top of the file).

Install

pnpm dlx shadcn@latest add @s7ui/system-error

Example

This example also uses @s7ui/button @s7ui/use-throw-to-boundary @s7ui/window.

This window is wrapped in an error boundary.

0

Info

Files:
components/retro/system-error.tsx
Uses:
@s7ui/theme, @s7ui/button, @s7ui/pixel-glyphs, @s7ui/alert-icons
Packages:
react-dom