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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

6250 };
6251 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
6252 const wrapInvocationError = <A, E>(
6253 effect: Effect.Effect<A, E>,
6254 ): Effect.Effect<A, ToolInvocationError> =>
6255 effect.pipe(
6256 Effect.mapError(
6257 (cause) =>
6258 new ToolInvocationError({
6259 address,
6260 message: formatInvocationCauseMessage(cause),
6261 cause,
6262 }),
6263 ),
6264 );
6265
6266 // Static path — O(1) map lookup for plugin-contributed static tools
6267 // (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