Skip to content

Commit

Permalink
fix: remove resource from state if not found
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Theuermann <[email protected]>
  • Loading branch information
mati007thm committed Dec 12, 2024
1 parent 9466fee commit 145a788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/provider/integration_github_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (r *integrationGithubResource) Read(ctx context.Context, req resource.ReadR
// Read API call logic
integration, err := r.client.GetClientIntegration(ctx, data.Mrn.ValueString())
if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to read GitHub integration, got error: %s", err))
resp.State.RemoveResource(ctx)
return
}

Expand Down

0 comments on commit 145a788

Please sign in to comment.