MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / wrapHandledError

Function wrapHandledError

client/src/utils/handled-error.ts:25–35  ·  view source on GitHub ↗
(
  err: Error,
  { type, message, redirectTo }: ErrorData
)

Source from the content-addressed store, hash-verified

23}
24
25export function wrapHandledError(
26 err: Error,
27 { type, message, redirectTo }: ErrorData
28): HandledError {
29 (err as HandledError)[handledErrorSymbol] = {
30 type,
31 message,
32 redirectTo
33 };
34 return err as HandledError;
35}

Callers 3

fetchSessionUserFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected