fix(godaddy): link to comment when 403 is encountered

This commit is contained in:
Quentin McGaw
2024-05-02 20:44:12 +00:00
parent 937a249ffa
commit d3541da812

View File

@@ -160,5 +160,15 @@ func (p *Provider) Update(ctx context.Context, client *http.Client, ip netip.Add
if jsonErr != nil || parsedJSON.Message == "" {
return netip.Addr{}, fmt.Errorf("%w: %s", err, utils.ToSingleLine(string(b)))
}
return netip.Addr{}, fmt.Errorf("%w: %s", err, parsedJSON.Message)
err = fmt.Errorf("%w: %s", err, parsedJSON.Message)
if response.StatusCode == http.StatusForbidden &&
parsedJSON.Message == "Authenticated user is not allowed access" {
err = fmt.Errorf("%w - "+
"See https://github.com/qdm12/ddns-updater/issues/707#issuecomment-2089632215",
err)
}
return netip.Addr{}, err
}