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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

6370 };
6371 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
6372 const wrapInvocationError = <A, E>(
6373 effect: Effect.Effect<A, E>,
6374 ): Effect.Effect<A, ToolInvocationError> =>
6375 effect.pipe(
6376 Effect.mapError(
6377 (cause) =>
6378 new ToolInvocationError({
6379 address,
6380 message: formatInvocationCauseMessage(cause),
6381 cause,
6382 }),
6383 ),
6384 );
6385
6386 // Static path — O(1) map lookup for plugin-contributed static tools
6387 // (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