verifyDomain
verifyDomain(
connection,domain):Promise<DomainCheckResult>
Defined in: verifyDomain.ts:60
Check whether a custom domain is registered in the target org, and what it’s already bound to.
Domain and DomainSite are read-only but SOQL-queryable (API 26.0+); they aren’t in the
source-deploy-retrieve metadata registry, so this is the only way to catch a typo’d or
unregistered domain before a deploy fails with a less specific Salesforce-side error.
Deliberately pure over a connection and a domain string — it doesn’t know which site the
caller intends to bind, so it can’t itself decide whether boundToSiteIds is a problem. The
caller compares those ids against whatever site it resolved and decides what’s fatal.
A query failure (missing permission, API error) is reported as 'unavailable' rather than
thrown, since an inability to run an advisory check isn’t the same as the check failing.
Parameters
Section titled “Parameters”connection
Section titled “connection”Connection
The org connection to query against.
domain
Section titled “domain”string
The fully qualified custom domain to look up.
Returns
Section titled “Returns”Promise<DomainCheckResult>
Whether the domain was found, its Id, and the sites it’s already bound to.