MCPcopy
hub / github.com/bvaughn/react-error-boundary / Fallback

Function Fallback

src/routes/examples/GetErrorMessage.ts:3–10  ·  view source on GitHub ↗
({ error }: FallbackProps)

Source from the content-addressed store, hash-verified

1import { getErrorMessage, type FallbackProps } from "react-error-boundary";
2
3function Fallback({ error }: FallbackProps) {
4 // Because 'error' can be anything, it's safest not to assume it's an Error
5 // Use the getErrorMessage helper method to extract the message instead.
6 const message = getErrorMessage(error) ?? "Unknown error";
7
8 // Render fallback UI...
9 return message; // hidden
10}
11
12// <end>
13

Callers

nothing calls this directly

Calls 1

getErrorMessageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…