From e31c8c364cfeeaa5121243f626bfaa89c3375e8b Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Tue, 11 Nov 2025 15:33:09 -0800 Subject: [PATCH] Fix broken stuff --- backend/src/ee/services/pki-acme/pki-acme-service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/ee/services/pki-acme/pki-acme-service.ts b/backend/src/ee/services/pki-acme/pki-acme-service.ts index 4958308e1..b2ba50d9f 100644 --- a/backend/src/ee/services/pki-acme/pki-acme-service.ts +++ b/backend/src/ee/services/pki-acme/pki-acme-service.ts @@ -29,6 +29,7 @@ import { TProjectDALFactory } from "@app/services/project/project-dal"; import { getProjectKmsCertificateKeyId } from "@app/services/project/project-fns"; import { getConfig } from "@app/lib/config/env"; +import { TAppConnectionDALFactory } from "@app/services/app-connection/app-connection-dal"; import { orderCertificate } from "@app/services/certificate-authority/acme/acme-certificate-authority-fns"; import { TCertificateAuthorityDALFactory } from "@app/services/certificate-authority/certificate-authority-dal"; import { CaType } from "@app/services/certificate-authority/certificate-authority-enums"; @@ -665,14 +666,14 @@ export const pkiAcmeServiceFactory = ({ // Check and validate the CSR const certificateRequest = extractCertificateRequestFromCSR(csr); if (!certificateRequest.commonName) { - throw new AcmeBadCSRError({ detail: "Invalid CSR: Common name is required" }); + throw new AcmeBadCSRError({ message: "Invalid CSR: Common name is required" }); } if ( certificateRequest.subjectAlternativeNames?.some( (san) => san.type !== CertSubjectAlternativeNameType.DNS_NAME ) ) { - throw new AcmeBadCSRError({ detail: "Invalid CSR: Only DNS subject alternative names are supported" }); + throw new AcmeBadCSRError({ message: "Invalid CSR: Only DNS subject alternative names are supported" }); } const orderWithAuthorizations = (await acmeOrderDAL.findByAccountAndOrderIdWithAuthorizations( accountId, @@ -690,7 +691,7 @@ export const pkiAcmeServiceFactory = ({ csrIdentifierValues.has(auth.identifierValue.toLowerCase()) ) ) { - throw new AcmeBadCSRError({ detail: "Invalid CSR: Common name + SANs mismatch with order identifiers" }); + throw new AcmeBadCSRError({ message: "Invalid CSR: Common name + SANs mismatch with order identifiers" }); } const ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(profile.caId);