Skip to content

Commit

Permalink
resource/alicloud_dcdn_domain_config: Added retry strategy for error …
Browse files Browse the repository at this point in the history
…code FlowControlError
  • Loading branch information
MrWolong committed Jul 1, 2024
1 parent d4c1850 commit 906d431
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alicloud/resource_alicloud_dcdn_domain_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func resourceAliCloudDcdnDomainConfigCreate(d *schema.ResourceData, meta interfa
err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError {
response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-15"), StringPointer("AK"), nil, request, &runtime)
if err != nil {
if NeedRetry(err) {
if IsExpectedErrors(err, []string{"FlowControlError"}) || NeedRetry(err) {
wait()
return resource.RetryableError(err)
}
Expand Down Expand Up @@ -259,7 +259,7 @@ func resourceAliCloudDcdnDomainConfigUpdate(d *schema.ResourceData, meta interfa
err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError {
response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-15"), StringPointer("AK"), nil, request, &runtime)
if err != nil {
if NeedRetry(err) {
if IsExpectedErrors(err, []string{"FlowControlError"}) || NeedRetry(err) {
wait()
return resource.RetryableError(err)
}
Expand Down

0 comments on commit 906d431

Please sign in to comment.