MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / handler

Function handler

packages/app/src/preload-error.ts:81–87  ·  view source on GitHub ↗
(event: Event)

Source from the content-addressed store, hash-verified

79/** Registers the handler; returns a disposer. */
80export const installPreloadErrorHandler = (env: PreloadErrorEnvironment): (() => void) => {
81 const handler = (event: Event) => {
82 // Always claim the event: Vite rethrows an unclaimed preload error into the
83 // page as an unhandled rejection, which is the crash report we are here to
84 // replace with a real recovery path.
85 event.preventDefault();
86 void respondToPreloadError(env, preloadErrorPayload(event));
87 };
88 env.target.addEventListener(PRELOAD_ERROR_EVENT, handler);
89 return () => env.target.removeEventListener(PRELOAD_ERROR_EVENT, handler);
90};

Callers 15

toEffectOnElicitationFunction · 0.50
buildElicitFunction · 0.50
enforceApprovalFunction · 0.50
serveOAuthFixtureFunction · 0.50
serveTokenEndpointFunction · 0.50
discoveryRouteFunction · 0.50
envelope.test.tsFile · 0.50
startRawServerFunction · 0.50
startRawServerFunction · 0.50
serveProbeEndpointFunction · 0.50
makeInvokerFunction · 0.50
makeRunnerFunction · 0.50

Calls 2

respondToPreloadErrorFunction · 0.85
preloadErrorPayloadFunction · 0.85

Tested by 15

serveOAuthFixtureFunction · 0.40
serveTokenEndpointFunction · 0.40
startRawServerFunction · 0.40
startRawServerFunction · 0.40
serveProbeEndpointFunction · 0.40
makeInvokerFunction · 0.40
makeRunnerFunction · 0.40
makeTestInvokerFunction · 0.40
makeTestInvokerFunction · 0.40
installFetchFunction · 0.40
getFunction · 0.40
signUpFunction · 0.40