Skip to content
Source
Sign inSign up

Errors.ts

27 lines850 Bytes

1import * as Schema from "effect/Schema";
2​
3export class ProviderInstanceNotFoundError extends Schema.TaggedError<ProviderInstanceNotFoundError>()(
4 "ProviderInstanceNotFoundError",
5 {
6 instanceId: Schema.String,
7 cause: Schema.optional(Schema.Defect()),
8 },
9) {
10 override get message(): string {
11 return `No provider instance bound to id '${this.instanceId}'`;
12 }
14​
15export { ProviderDriverError } from "@t3tools/provider-core/server/errors";
16​
17export class ProviderWorkspaceMissingError extends Schema.TaggedError<ProviderWorkspaceMissingError>()(
18 "ProviderWorkspaceMissingError",
19 {
20 threadId: Schema.String,
21 cwd: Schema.String,
22 },
23) {
24 override get message(): string {
25 return `This thread's workspace folder no longer exists or is not a directory: ${this.cwd}. Restore the folder at this path before retrying.`;
26 }