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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

3739 };
3740 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
3741 const wrapInvocationError = <A, E>(
3742 effect: Effect.Effect<A, E>,
3743 ): Effect.Effect<A, ToolInvocationError> =>
3744 effect.pipe(
3745 Effect.mapError(
3746 (cause) =>
3747 new ToolInvocationError({
3748 address,
3749 message: formatInvocationCauseMessage(cause),
3750 cause,
3751 }),
3752 ),
3753 );
3754
3755 // Static path — O(1) map lookup for plugin-contributed static tools
3756 // (core-tools, plugin executor namespaces). Addressed by their fqid,

Callers 2

executeFunction · 0.85
invokeWithFunction · 0.85

Calls 1

Tested by

no test coverage detected