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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

6462 };
6463 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
6464 const wrapInvocationError = <A, E>(
6465 effect: Effect.Effect<A, E>,
6466 ): Effect.Effect<A, ToolInvocationError> =>
6467 effect.pipe(
6468 Effect.mapError(
6469 (cause) =>
6470 new ToolInvocationError({
6471 address,
6472 message: formatInvocationCauseMessage(cause),
6473 cause,
6474 }),
6475 ),
6476 );
6477
6478 // Static path — O(1) map lookup for plugin-contributed static tools
6479 // (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