remix-v2-error-boundaries-review

Installation
SKILL.md

Remix v2 Error Boundaries Code Review

Targets TypeScript route modules importing from @remix-run/*. No sibling knowledge skill exists for this topic; the canonical mental model is summarized inline below and expanded in references/.

v2 Boundary Model (read first)

Remix v2 unified v1's CatchBoundary + ErrorBoundary into a single ErrorBoundary route-module export. The framework calls it for both thrown Responses (e.g. throw new Response(...), throw json(...)) and thrown runtime errors (loader/action/render exceptions). Inside the boundary you read the value with the useRouteError() hook, then narrow in this order:

  1. isRouteErrorResponse(error) → it was a thrown Response; read error.status, error.statusText, error.data.
  2. error instanceof Error → real runtime error; read error.message.
  3. else → unknown thrown value; render a generic fallback.
Installs
21
GitHub Stars
68
First Seen
May 15, 2026
remix-v2-error-boundaries-review — existential-birds/beagle