Skip to content

Commit

Permalink
Use customclient for retrieving JSON dashboards (#1167)
Browse files Browse the repository at this point in the history
  • Loading branch information
skarimo authored Aug 5, 2021
1 parent 20e7720 commit 5d0a44b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datadog/resource_datadog_dashboard_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func resourceDatadogDashboardJSONCreate(ctx context.Context, d *schema.ResourceD

var httpResponse *http.Response
err = resource.RetryContext(ctx, d.Timeout(schema.TimeoutCreate), func() *resource.RetryError {
_, httpResponse, err = datadogClientV1.DashboardsApi.GetDashboard(authV1, id.(string))
_, httpResponse, err = utils.SendRequest(authV1, datadogClientV1, "GET", path+"/"+id.(string), nil)
if err != nil {
if httpResponse != nil && httpResponse.StatusCode == 404 {
return resource.RetryableError(fmt.Errorf("dashboard not created yet"))
Expand Down

0 comments on commit 5d0a44b

Please sign in to comment.