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

Function wrapInvocationError

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

Source from the content-addressed store, hash-verified

4198 };
4199 // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message, executor/no-manual-tag-check
4200 const wrapInvocationError = <A, E>(
4201 effect: Effect.Effect<A, E>,
4202 ): Effect.Effect<A, ToolInvocationError> =>
4203 effect.pipe(
4204 Effect.mapError(
4205 (cause) =>
4206 new ToolInvocationError({
4207 address,
4208 message: formatInvocationCauseMessage(cause),
4209 cause,
4210 }),
4211 ),
4212 );
4213
4214 // Static path — O(1) map lookup for plugin-contributed static tools
4215 // (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