| 1 | import * as Schema from "effect/Schema"; |
| 2 | |
| 3 | import { TrimmedNonEmptyString } from "./baseSchemas.ts"; |
| 4 | |
| 5 | /** |
| 6 | * A command dispatch failure. `bootstrapThreadDisposition` tells a client whether the |
| 7 | * thread a bootstrap turn would have created was removed or never created. |
| 8 | */ |
| 9 | export class OrchestrationDispatchCommandError extends Schema.TaggedError<OrchestrationDispatchCommandError>()( |
| 10 | "OrchestrationDispatchCommandError", |
| 11 | { |
| 12 | message: TrimmedNonEmptyString, |
| 13 | cause: Schema.optional(Schema.Defect()), |
| 14 | bootstrapThreadDisposition: Schema.optional(Schema.Literals(["deleted", "not-created"])), |
| 15 | }, |
| 16 | ) {} |