MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / fallback

Function fallback

packages/solid/src/errorboundary.ts:19–29  ·  view source on GitHub ↗
(error: unknown, reset: () => void)

Source from the content-addressed store, hash-verified

17 const [local, others] = splitProps(props, ['fallback']);
18
19 const fallback = (error: unknown, reset: () => void): JSX.Element => {
20 captureException(error, {
21 mechanism: {
22 handled: true, // handled because user has to provide a fallback
23 type: 'auto.function.solid.error_boundary',
24 },
25 });
26
27 const f = local.fallback;
28 return typeof f === 'function' ? f(error, reset) : f;
29 };
30
31 return createComponent(ErrorBoundary, mergeProps({ fallback }, others));
32 };

Callers

nothing calls this directly

Calls 2

fFunction · 0.85
captureExceptionFunction · 0.50

Tested by

no test coverage detected