mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 19:26:07 +00:00
misc: addressed undefined issue
This commit is contained in:
+8
@@ -1209,6 +1209,10 @@ export const internalCertificateAuthorityServiceFactory = ({
|
|||||||
ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(certificateTemplate.caId);
|
ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(certificateTemplate.caId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ca) {
|
||||||
|
throw new NotFoundError({ message: `Internal CA with ID '${caId}' not found` });
|
||||||
|
}
|
||||||
|
|
||||||
if (!ca?.internalCa?.id) {
|
if (!ca?.internalCa?.id) {
|
||||||
throw new NotFoundError({ message: `Internal CA with ID '${caId}' not found` });
|
throw new NotFoundError({ message: `Internal CA with ID '${caId}' not found` });
|
||||||
}
|
}
|
||||||
@@ -1561,6 +1565,10 @@ export const internalCertificateAuthorityServiceFactory = ({
|
|||||||
ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(certificateTemplate.caId);
|
ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(certificateTemplate.caId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ca) {
|
||||||
|
throw new NotFoundError({ message: `Internal CA with ID '${caId}' not found` });
|
||||||
|
}
|
||||||
|
|
||||||
if (!ca?.internalCa?.id) {
|
if (!ca?.internalCa?.id) {
|
||||||
throw new NotFoundError({ message: `Internal CA with ID '${caId}' not found` });
|
throw new NotFoundError({ message: `Internal CA with ID '${caId}' not found` });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user