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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

3640 };
3641 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
3642 const wrapInvocationError = <A, E>(
3643 effect: Effect.Effect<A, E>,
3644 ): Effect.Effect<A, ToolInvocationError> =>
3645 effect.pipe(
3646 Effect.mapError(
3647 (cause) =>
3648 new ToolInvocationError({
3649 address,
3650 message: formatInvocationCauseMessage(cause),
3651 cause,
3652 }),
3653 ),
3654 );
3655
3656 // Static path — O(1) map lookup for plugin-contributed static tools
3657 // (core-tools, plugin executor namespaces). Addressed by their fqid,

Callers 1

executeFunction · 0.85

Calls 1

Tested by

no test coverage detected