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

Function nameFromUnknown

packages/react/src/api/error-reporting.tsx:64–68  ·  view source on GitHub ↗
(value: unknown, fallback: string)

Source from the content-addressed store, hash-verified

62
63/** Effect's tagged errors identify themselves by `_tag`, not by `name`. */
64const nameFromUnknown = (value: unknown, fallback: string): string =>
65 Option.match(decodeTaggedValue(value), {
66 onNone: () => fallback,
67 onSome: ({ _tag }) => _tag,
68 });
69
70/** Keep the original value reachable without clobbering an existing chain. */
71const withOriginalCause = (error: Error, original: unknown): Error => {

Callers 1

errorFromValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected