Zum Hauptinhalt springen

Komponentengrenze

Svelte's <svelte:boundary> catches runtime errors within a component tree and renders a fallback UI instead of crashing the entire page.

This component is alive and well.

BoundaryFallback-Varianten

The BoundaryFallback component accepts custom titles, descriptions, and minimum heights to fit different contexts.

Route-Fehlerseiten

Errors that escape a boundary are caught by route-level +error.svelte pages, then error.html as the last resort.

Fehlergrenzen

Four +error.svelte files provide contextual recovery actions for each area:

routes/+error.svelte Root fallback — "Go home" action
routes/app/+error.svelte Authenticated area — "Back to dashboard" with sidebar visible
routes/auth/+error.svelte Auth flow — "Back to sign in" action
routes/showcases/+error.svelte Showcases — contextual hints per showcase category

Geht dieses Pattern noch besser? Sag uns, wie.

Feedback geben