Error Boundary

Contain a crash in one widget with Angular's @boundary block, show a fallback and recover. It needs Angular 22.2 or newer.

What it shows

  • @boundary and @error — when the price tile throws while rendering, its fallback takes its place and the rest of the screen keeps working. See Handling errors.
  • $reset — the Retry button restores the price, then calls retry() to render the tile again. Fix the cause first, or it fails again.
  • when on @error — the profile card shows an "offline" fallback for an OfflineError, and a generic one for anything else.
  • resource() — value() throws while the resource is in its error state, so a boundary catches a failed load. An @if handles the loading state first.
  • onViewError — caught errors still reach the ErrorHandler. boundary-log.ts extends LynxErrorHandler to list them on screen, and defers its signal write with queueMicrotask. See LynxErrorHandler.