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

Function wrapInvocationError

packages/core/sdk/src/executor.ts:3658–3670  ·  view source on GitHub ↗
(
          effect: Effect.Effect<A, E>,
        )

Source from the content-addressed store, hash-verified

3656 };
3657 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
3658 const wrapInvocationError = <A, E>(
3659 effect: Effect.Effect<A, E>,
3660 ): Effect.Effect<A, ToolInvocationError> =>
3661 effect.pipe(
3662 Effect.mapError(
3663 (cause) =>
3664 new ToolInvocationError({
3665 address,
3666 message: formatInvocationCauseMessage(cause),
3667 cause,
3668 }),
3669 ),
3670 );
3671
3672 // Static path — O(1) map lookup for plugin-contributed static tools
3673 // (core-tools, plugin executor namespaces). Addressed by their fqid,

Callers 1

executeFunction · 0.85

Calls 1

Tested by

no test coverage detected