check / check (push) Canceled after 0s
When a domain's parent zone's servers answer NXDOMAIN, LookupNS returns ErrNXDomain. The watcher then saves the domain with no nameservers and nxdomain set, shown on the dashboard and in /api/v1/status, asks for none of its records and removes those saved, so its old nameservers go in one NS Change. A domain with no delegation of its own gets an empty set and its records are still asked at the zone it is in. FindAuthoritativeNameservers moves to a parent name only on one of those two answers; when the servers do not answer, it returns the error. After an upgrade, a domain without its own delegation that was saved with its parent zone's nameservers gets one NS Change; the README says so. Model: opus-5-5
57 lines
1.9 KiB
Go
57 lines
1.9 KiB
Go
package resolver
|
|
|
|
import "errors"
|
|
|
|
// Sentinel errors returned by the resolver.
|
|
var (
|
|
// ErrNoNameservers is returned when no authoritative NS
|
|
// could be discovered for a domain.
|
|
ErrNoNameservers = errors.New(
|
|
"no authoritative nameservers found",
|
|
)
|
|
|
|
// ErrNXDomain is returned when the servers of the zone a domain
|
|
// is in answer NXDOMAIN: the domain does not exist.
|
|
ErrNXDomain = errors.New("domain does not exist")
|
|
|
|
// ErrNoNameserverAnswered is returned when every nameserver
|
|
// asked about a name timed out, failed or returned a referral,
|
|
// so whether the name has addresses is unknown.
|
|
ErrNoNameserverAnswered = errors.New("no nameserver answered")
|
|
|
|
// ErrUnusableReply is returned when a server replied with an
|
|
// error such as SERVFAIL, or with a referral that leads no
|
|
// closer to the name asked about.
|
|
ErrUnusableReply = errors.New(
|
|
"reply is an error or a referral that leads no closer",
|
|
)
|
|
|
|
// ErrTruncated is the reason given for a reply too large for UDP
|
|
// whose retry over TCP failed.
|
|
ErrTruncated = errors.New(
|
|
"reply truncated and its retry over TCP failed",
|
|
)
|
|
|
|
// ErrIntercepted is returned when every root server refused a
|
|
// query. Root servers refuse no query, so the refusals came from
|
|
// something on the network answering in their place.
|
|
ErrIntercepted = errors.New("this network intercepts DNS queries")
|
|
|
|
// ErrCNAMEDepthExceeded is returned when a CNAME chain
|
|
// exceeds MaxCNAMEDepth.
|
|
ErrCNAMEDepthExceeded = errors.New(
|
|
"CNAME chain depth exceeded",
|
|
)
|
|
|
|
// ErrLookupDepthExceeded is returned when nameserver addresses
|
|
// were not looked up because lookups were already maxLookupDepth
|
|
// deep, one inside another.
|
|
ErrLookupDepthExceeded = errors.New(
|
|
"lookups of nameserver addresses go too deep",
|
|
)
|
|
|
|
// ErrContextCanceled wraps context cancellation for the
|
|
// resolver's iterative queries.
|
|
ErrContextCanceled = errors.New("context canceled")
|
|
)
|