Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions packages/core/sdk/src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Data, Schema } from "effect";
import { Schema } from "effect";

import { ConnectionId, ToolId, SecretId } from "./ids";

Expand All @@ -14,11 +14,14 @@ export class ToolNotFoundError extends Schema.TaggedErrorClass<ToolNotFoundError
},
) {}

export class ToolInvocationError extends Data.TaggedError("ToolInvocationError")<{
readonly toolId: ToolId;
readonly message: string;
readonly cause?: unknown;
}> {}
export class ToolInvocationError extends Schema.TaggedErrorClass<ToolInvocationError>()(
"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
Expand Down
Loading