mail: on location change, ignore error if dns cannot be updated

This commit is contained in:
Girish Ramakrishnan
2020-12-07 00:02:56 -08:00
parent 3b8bc47ee5
commit 9d4082356b

View File

@@ -768,7 +768,7 @@ function txtRecordsWithSpf(domain, mailFqdn, callback) {
assert.strictEqual(typeof callback, 'function');
domains.getDnsRecords('', domain, 'TXT', function (error, txtRecords) {
if (error) return error;
if (error) return callback(error);
debug('txtRecordsWithSpf: current txt records - %j', txtRecords);
@@ -939,7 +939,10 @@ function changeLocation(auditSource, progressCallback, callback) {
progressCallback({ percent: progress, message: `Updating DNS of ${domainObject.domain}` });
progress += Math.round(70/allDomains.length);
upsertDnsRecords(domainObject.domain, fqdn, iteratorDone);
upsertDnsRecords(domainObject.domain, fqdn, function (error) { // ignore any errors. we anyway report dns errors in status tab
progressCallback({ percent: progress, message: `Updated DNS of ${domainObject.domain}: ${error ? error.message : 'success'}` });
iteratorDone();
});
}, function (error) {
if (error) return callback(error);