diff --git a/packages/core/sdk/src/errors.ts b/packages/core/sdk/src/errors.ts index 59efd95a5..764e0f2eb 100644 --- a/packages/core/sdk/src/errors.ts +++ b/packages/core/sdk/src/errors.ts @@ -1,4 +1,4 @@ -import { Data, Schema } from "effect"; +import { Schema } from "effect"; import { ConnectionId, ToolId, SecretId } from "./ids"; @@ -14,11 +14,14 @@ export class ToolNotFoundError extends Schema.TaggedErrorClass {} +export class ToolInvocationError extends Schema.TaggedErrorClass()( + "ToolInvocationError", + { + toolId: ToolId, + message: Schema.String, + cause: Schema.optional(Schema.Defect), + }, +) {} /** Tool row exists in the DB but its owning plugin isn't loaded. Means * the tool was registered by a plugin that's no longer present in the