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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

4357 };
4358 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
4359 const wrapInvocationError = <A, E>(
4360 effect: Effect.Effect<A, E>,
4361 ): Effect.Effect<A, ToolInvocationError> =>
4362 effect.pipe(
4363 Effect.mapError(
4364 (cause) =>
4365 new ToolInvocationError({
4366 address,
4367 message: formatInvocationCauseMessage(cause),
4368 cause,
4369 }),
4370 ),
4371 );
4372
4373 // Static path — O(1) map lookup for plugin-contributed static tools
4374 // (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