CLOUDNS: don't print full URL on error (#3124) (#3126)

This commit is contained in:
Hamish Moffatt 2024-09-24 14:02:55 +00:00 committed by GitHub
parent 2a424f5672
commit c1abd5d9fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -265,7 +265,9 @@ func (c *cloudnsProvider) get(endpoint string, params requestParams) ([]byte, er
err = json.Unmarshal(bodyString, &errResp)
if err == nil {
if errResp.Status == "Failed" {
return bodyString, fmt.Errorf("ClouDNS API error: %s URL:%s%s ", errResp.Description, req.Host, req.URL.RequestURI())
// For debug only - req.URL.RequestURI() contains the authentication params:
// return bodyString, fmt.Errorf("ClouDNS API error: %s URL:%s%s ", errResp.Description, req.Host, req.URL.RequestURI())
return bodyString, fmt.Errorf("ClouDNS API error: %s", errResp.Description)
}
}