wildcard: better error message

This commit is contained in:
Girish Ramakrishnan
2022-02-16 20:22:50 -08:00
parent 773dfd9a7b
commit 149f778652
+1 -1
View File
@@ -80,7 +80,7 @@ async function verifyDomainConfig(domainObject) {
const fqdn = dns.fqdn(location, domainObject);
const [ipv4Error, ipv4Result] = await safe(dig.resolve(fqdn, 'A', { server: '127.0.0.1', timeout: 5000 }));
if (ipv4Error && ipv4Error.code === 'ENOTFOUND') throw new BoxError(BoxError.BAD_FIELD, `Unable to resolve IPv4 of ${fqdn}`);
if (ipv4Error && ipv4Error.code === 'ENOTFOUND') throw new BoxError(BoxError.BAD_FIELD, `Unable to resolve IPv4 of ${fqdn}. Please check if you have set up *.${domainObject.domain} to point to this server's IP`);
if (ipv4Error || !ipv4Result) throw new BoxError(BoxError.BAD_FIELD, ipv4Error ? ipv4Error.message : `Unable to resolve IPv4 of ${fqdn}`);
const ipv4 = await sysinfo.getServerIPv4();