Fix error type

This commit is contained in:
Girish Ramakrishnan
2017-01-10 14:21:31 -08:00
parent d674d72508
commit f4b635a169
+1 -1
View File
@@ -228,7 +228,7 @@ function verifyDnsConfig(dnsConfig, domain, ip, callback) {
dns.resolveNs(domain, function (error, nameservers) {
if (error && error.code === 'ENOTFOUND') return callback(new SubdomainError(SubdomainError.BAD_FIELD, 'Unable to resolve nameservers for this domain'));
if (error || !nameservers) return callback(error || new Error('Unable to get nameservers'));
if (error || !nameservers) return callback(new SubdomainError(SubdomainError.BAD_FIELD, error ? error.message : 'Unable to get nameservers'));
getHostedZone(credentials, domain, function (error, zone) {
if (error) return callback(error);