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 0861d68 commit db321ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/provider/integration_gitlab_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (r *integrationGitlabResource) 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 db321ff

Please sign in to comment.