mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 18:48:49 -04:00
fix(aliyun): error context fixed when handling bad request errors
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user