--- title: 'Error boundaries' slug: error-boundaries description: 'Hydratable islands are automatically wrapped in svelte:boundary so a single island failure cannot crash the page.' --- ## Error boundaries Mochi auto-wraps every `mochi:hydrate` and `mochi:hydrate:visible` island in ``. A throw inside one island no longer takes down the page render — the failed island is replaced by a `` stub and the rest of the page continues. No opt-in, no configuration. Do **NOT** assume Mochi wraps your page in a boundary; instead, author `` yourself where you want graceful degradation. ### What's wrapped - `mochi:hydrate` — wrapped. - `mochi:hydrate:visible` — wrapped. - `mochi:defer` — handled by the server-island endpoint instead, not by a boundary. - Top-level page render throws — go to the configured `errorPage`. See `Error handling`. ### What gets caught - Synchronous SSR throws inside the island. - Async SSR throws (`await Promise.reject(...)` in a top-level `