1import { OrchestrationDispatchCommandError } from "@t3tools/contracts";
2import * as Schema from "effect/Schema";
3
4const isOrchestrationDispatchCommandError = Schema.is(OrchestrationDispatchCommandError);
5
6export function wasBootstrapThreadDeleted(error: unknown): boolean {
7 return (
8 isOrchestrationDispatchCommandError(error) && error.bootstrapThreadDisposition === "deleted"
9 );
10}
11
12export function wasBootstrapThreadNotCreated(error: unknown): boolean {
13 return (
14 isOrchestrationDispatchCommandError(error) && error.bootstrapThreadDisposition === "not-created"
15 );
16}