mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 08:58:16 +03:00
for dns errors when looking up a tlsrpt record in the admin, don't make it a server error
but a user error. so we don't generate alerts through prometheus.
This commit is contained in:
parent
448879126d
commit
a0bae5be55
@ -2032,7 +2032,7 @@ func (Admin) LookupTLSRPTRecord(ctx context.Context, domain string) (record *TLS
|
||||
|
||||
resolver := dns.StrictResolver{Pkg: "webadmin"}
|
||||
r, txt, err := tlsrpt.Lookup(ctx, resolver, dom)
|
||||
if err != nil && (errors.Is(err, tlsrpt.ErrNoRecord) || errors.Is(err, tlsrpt.ErrMultipleRecords) || errors.Is(err, tlsrpt.ErrRecordSyntax)) {
|
||||
if err != nil && (errors.Is(err, tlsrpt.ErrNoRecord) || errors.Is(err, tlsrpt.ErrMultipleRecords) || errors.Is(err, tlsrpt.ErrRecordSyntax) || errors.Is(err, tlsrpt.ErrDNS)) {
|
||||
errstr = err.Error()
|
||||
err = nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user