Skip to content

Commit

Permalink
remove custom error (#85)
Browse files Browse the repository at this point in the history
Co-authored-by: Dean Oren <deangili.oren@mail.schwarz>
  • Loading branch information
do87 and Dean Oren authored Jan 11, 2023
1 parent a0dfb2f commit 79f3fd6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions stackit/internal/resources/data-services/instance/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,11 @@ func (r Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *
return
}

planID := plan.PlanID
if err := r.applyClientResponse(ctx, &plan, newRes.JSON200); err != nil {
resp.Diagnostics.AddError("failed to process client response", err.Error())
return
}

if !plan.PlanID.Equal(planID) {
resp.Diagnostics.AddError("server returned wrong plan ID after update", fmt.Sprintf("expected plan ID %s but received %s", planID.ValueString(), plan.PlanID.ValueString()))
return
}

// update state
diags := resp.State.Set(ctx, &plan)
resp.Diagnostics.Append(diags...)
Expand Down

0 comments on commit 79f3fd6

Please sign in to comment.