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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

5019 };
5020 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
5021 const wrapInvocationError = <A, E>(
5022 effect: Effect.Effect<A, E>,
5023 ): Effect.Effect<A, ToolInvocationError> =>
5024 effect.pipe(
5025 Effect.mapError(
5026 (cause) =>
5027 new ToolInvocationError({
5028 address,
5029 message: formatInvocationCauseMessage(cause),
5030 cause,
5031 }),
5032 ),
5033 );
5034
5035 // Static path — O(1) map lookup for plugin-contributed static tools
5036 // (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