@cfxlabsinc/b2b-services
    Preparing search index...
    AiPriseDecisionError:
        | ServiceError<
            | "ORGANIZATION_NOT_FOUND"
            | "ORGANIZATION_STATUS_CONFLICT"
            | "IDENTITY_NOT_FOUND"
            | "RELATED_PERSON_NOT_FOUND"
            | "VERIFICATION_TEMPLATE_NOT_FOUND",
        >
        | ServiceError<
            "PAYMENT_INSTRUMENT_NOT_FOUND",
            { paymentInstrumentId: PaymentInstrument["id"]; phase: "READ"
            | "WRITE" },
        >
        | ServiceError<
            "PAYMENT_INSTRUMENT_NOT_WIRE",
            {
                paymentInstrumentId: PaymentInstrument["id"];
                type: PaymentInstrument["type"];
            },
        >
        | ServiceError<
            "CUSTOMER_NOT_FOUND",
            { organization: Pick<AdminOrganization, "id" | "status"> },
        >

    Each message is the string the consumer threw before, so toError keeps it as a substring.