From 95ed43c9bf0759c927ae68d03e400dea2e48074c Mon Sep 17 00:00:00 2001 From: Kishore <42832651+kishore03109@users.noreply.github.com> Date: Tue, 30 Apr 2024 09:25:28 +0800 Subject: [PATCH] fix(sitelaunch): do not throw for no dig results --- support/routes/v2/formsg/formsgSiteLaunch.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/support/routes/v2/formsg/formsgSiteLaunch.ts b/support/routes/v2/formsg/formsgSiteLaunch.ts index ac0ab6af3..0b3c1be1a 100644 --- a/support/routes/v2/formsg/formsgSiteLaunch.ts +++ b/support/routes/v2/formsg/formsgSiteLaunch.ts @@ -252,6 +252,7 @@ export class FormsgSiteLaunchRouter { logger.info( `Domain ${launchResult.primaryDomainSource} does not have any AAAA records.` ) + return [] // no AAAA records found } logger.error( `Error when trying to get AAAA records for domain ${launchResult.primaryDomainSource}: ${e}` @@ -315,6 +316,12 @@ export class FormsgSiteLaunchRouter { logger.info( `Domain ${launchResult.primaryDomainSource} does not have any CAA records.` ) + + // if no CAA records, no need to add Amazon CAA and letsencrypt.org CAA + return { + addAWSACMCertCAA: false, + addLetsEncryptCAA: false, + } } logger.error( `Error when trying to get CAA records for domain ${launchResult.primaryDomainSource}: ${e}`