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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

4285 };
4286 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
4287 const wrapInvocationError = <A, E>(
4288 effect: Effect.Effect<A, E>,
4289 ): Effect.Effect<A, ToolInvocationError> =>
4290 effect.pipe(
4291 Effect.mapError(
4292 (cause) =>
4293 new ToolInvocationError({
4294 address,
4295 message: formatInvocationCauseMessage(cause),
4296 cause,
4297 }),
4298 ),
4299 );
4300
4301 // Static path — O(1) map lookup for plugin-contributed static tools
4302 // (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