17 lines
581 B
TypeScript
17 lines
581 B
TypeScript
import { OrchestrationDispatchCommandError } from "@t3tools/contracts";
|
|
import * as Schema from "effect/Schema";
|
|
|
|
const isOrchestrationDispatchCommandError = Schema.is(OrchestrationDispatchCommandError);
|
|
|
|
export function wasBootstrapThreadDeleted(error: unknown): boolean {
|
|
return (
|
|
isOrchestrationDispatchCommandError(error) && error.bootstrapThreadDisposition === "deleted"
|
|
);
|
|
}
|
|
|
|
export function wasBootstrapThreadNotCreated(error: unknown): boolean {
|
|
return (
|
|
isOrchestrationDispatchCommandError(error) && error.bootstrapThreadDisposition === "not-created"
|
|
);
|
|
}
|