Skip to content

Commit 002babb

Browse files
authored
fix: gracefully handle 404 in issue_alert and project Read methods (#673)
1 parent f1b90fe commit 002babb

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

internal/provider/resource_issue_alert.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,6 @@ func (r *IssueAlertResource) Read(ctx context.Context, req resource.ReadRequest,
813813
resp.Diagnostics.Append(diagutils.NewClientError("read", err))
814814
return
815815
} else if httpResp.StatusCode() == http.StatusNotFound {
816-
resp.Diagnostics.Append(diagutils.NewNotFoundError("issue alert"))
817816
resp.State.RemoveResource(ctx)
818817
return
819818
} else if httpResp.StatusCode() != http.StatusOK || httpResp.JSON200 == nil {

internal/provider/resource_project.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,6 @@ func (r *ProjectResource) Read(ctx context.Context, req resource.ReadRequest, re
643643
resp.Diagnostics.Append(diagutils.NewClientError("read", err))
644644
return
645645
} else if httpResp.StatusCode() == http.StatusNotFound {
646-
resp.Diagnostics.Append(diagutils.NewNotFoundError("project"))
647646
resp.State.RemoveResource(ctx)
648647
return
649648
} else if httpResp.StatusCode() != http.StatusOK || httpResp.JSON200 == nil {

0 commit comments

Comments
 (0)