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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

5749 };
5750 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
5751 const wrapInvocationError = <A, E>(
5752 effect: Effect.Effect<A, E>,
5753 ): Effect.Effect<A, ToolInvocationError> =>
5754 effect.pipe(
5755 Effect.mapError(
5756 (cause) =>
5757 new ToolInvocationError({
5758 address,
5759 message: formatInvocationCauseMessage(cause),
5760 cause,
5761 }),
5762 ),
5763 );
5764
5765 // Static path — O(1) map lookup for plugin-contributed static tools
5766 // (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