-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sitelaunch): do not throw for no dig results #1355
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -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}` | ||||||||||||||||||||
Comment on lines
257
to
258
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. /nit since you're editing this file, you could take the opportunity to clean up the neighbouring log statements. The existing statements does not print the error (since errors are not serializable).
Suggested change
Same can be done for the other error() and info() logs seen as context code in the PR. But yeah, so main message with enahnced logging:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since merged will create a separate pr #1358 ya There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes Sir 👍 . Thank you 🙏 . |
||||||||||||||||||||
|
@@ -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 | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. without this return, this ended up throwing an error instead |
||||||||||||||||||||
return { | ||||||||||||||||||||
addAWSACMCertCAA: false, | ||||||||||||||||||||
addLetsEncryptCAA: false, | ||||||||||||||||||||
} | ||||||||||||||||||||
} | ||||||||||||||||||||
logger.error( | ||||||||||||||||||||
`Error when trying to get CAA records for domain ${launchResult.primaryDomainSource}: ${e}` | ||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without this return, this ended up throwing an error instead