token-validator: precise GLUE error

This commit is contained in:
nemunaire 2021-02-04 09:33:01 +01:00
parent 1280c7aad1
commit 66cfb49a08

View File

@ -49,7 +49,7 @@ func check_GLUE_respond(student adlin.Student, domain string, ip string) (err er
return errors.New("Response from name server is nil") return errors.New("Response from name server is nil")
} }
if r.Rcode != dns.RcodeSuccess { if r.Rcode != dns.RcodeSuccess {
return errors.New("Failed to get a valid answer") return fmt.Errorf("Name server returns %s", dns.RcodeToString[r.Rcode])
} }
if len(r.Answer) == 0 { if len(r.Answer) == 0 {