fix(aliyun): error context fixed when handling bad request errors

This commit is contained in:
Quentin McGaw
2024-11-12 13:19:30 +00:00
parent c23da1518e
commit 9a62043ff6

View File

@@ -58,7 +58,7 @@ func (p *Provider) getRecordID(ctx context.Context, client *http.Client,
if err != nil || data.Code != "InvalidDomainName.NoExist" {
return "", fmt.Errorf("%w: %d: %s",
errors.ErrHTTPStatusNotValid, response.StatusCode,
utils.BodyToSingleLine(response.Body))
utils.ToSingleLine(string(bodyBytes)))
}
return "", fmt.Errorf("%w", errors.ErrRecordNotFound)