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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

4311 };
4312 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
4313 const wrapInvocationError = <A, E>(
4314 effect: Effect.Effect<A, E>,
4315 ): Effect.Effect<A, ToolInvocationError> =>
4316 effect.pipe(
4317 Effect.mapError(
4318 (cause) =>
4319 new ToolInvocationError({
4320 address,
4321 message: formatInvocationCauseMessage(cause),
4322 cause,
4323 }),
4324 ),
4325 );
4326
4327 // Static path — O(1) map lookup for plugin-contributed static tools
4328 // (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