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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

3392 };
3393 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
3394 const wrapInvocationError = <A, E>(
3395 effect: Effect.Effect<A, E>,
3396 ): Effect.Effect<A, ToolInvocationError> =>
3397 effect.pipe(
3398 Effect.mapError(
3399 (cause) =>
3400 new ToolInvocationError({
3401 address,
3402 message: formatInvocationCauseMessage(cause),
3403 cause,
3404 }),
3405 ),
3406 );
3407
3408 // Static path — O(1) map lookup for plugin-contributed static tools
3409 // (core-tools, plugin executor namespaces). Addressed by their fqid,

Callers 1

executeFunction · 0.85

Calls 1

Tested by

no test coverage detected