MCPcopy Create free account
hub / github.com/bvaughn/react-error-boundary / GetErrorMessageRoute

Function GetErrorMessageRoute

src/routes/GetErrorMessageRoute.tsx:4–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { html } from "../../public/generated/examples/GetErrorMessage.json";
3
4export default function GetErrorMessageRoute() {
5 return (
6 <Box direction="column" gap={4}>
7 <Header section="API" title="getErrorMessage helper" />
8 <div>
9 Typically <em>thrown</em> errors in JavaScript are instances of type{" "}
10 <code>Error</code>, but{" "}
11 <ExternalLink href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/throw">
12 this is not always the case
13 </ExternalLink>
14 . Any value can be thrown- strings, numbers, even <code>null</code> or{" "}
15 <code>undefined</code>.
16 </div>
17 <div>
18 To simplify working with thrown values, this library exports a utility
19 method called <code>getErrorMessage</code>.
20 </div>
21 <Code html={html} />
22 </Box>
23 );
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected