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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

4741 };
4742 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
4743 const wrapInvocationError = <A, E>(
4744 effect: Effect.Effect<A, E>,
4745 ): Effect.Effect<A, ToolInvocationError> =>
4746 effect.pipe(
4747 Effect.mapError(
4748 (cause) =>
4749 new ToolInvocationError({
4750 address,
4751 message: formatInvocationCauseMessage(cause),
4752 cause,
4753 }),
4754 ),
4755 );
4756
4757 // Static path — O(1) map lookup for plugin-contributed static tools
4758 // (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