File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,12 @@ func (d *dataSourceAlertGroupingSetting) Read(ctx context.Context, req datasourc
68
68
return
69
69
}
70
70
71
- var cursorAfter , cursorBefore string
71
+ var cursorAfter string
72
72
var found * pagerduty.AlertGroupingSetting
73
73
err := apiutil .All (ctx , func (offset int ) (bool , error ) {
74
74
resp , err := d .client .ListAlertGroupingSettings (ctx , pagerduty.ListAlertGroupingSettingsOptions {
75
- After : cursorAfter ,
76
- Before : cursorBefore ,
77
- Limit : 100 ,
75
+ After : cursorAfter ,
76
+ Limit : 100 ,
78
77
})
79
78
if err != nil {
80
79
return false , err
@@ -87,6 +86,7 @@ func (d *dataSourceAlertGroupingSetting) Read(ctx context.Context, req datasourc
87
86
}
88
87
}
89
88
89
+ cursorAfter = resp .After
90
90
return resp .After != "" , nil
91
91
})
92
92
if err != nil {
Original file line number Diff line number Diff line change @@ -147,6 +147,9 @@ func (r *resourceAlertGroupingSetting) Create(ctx context.Context, req resource.
147
147
err := retry .RetryContext (ctx , 2 * time .Minute , func () * retry.RetryError {
148
148
response , err := r .client .CreateAlertGroupingSetting (ctx , plan )
149
149
if err != nil {
150
+ if util .IsBadRequestError (err ) {
151
+ return retry .NonRetryableError (err )
152
+ }
150
153
return retry .RetryableError (err )
151
154
}
152
155
plan .ID = response .ID
You can’t perform that action at this time.
0 commit comments