Skip to content

Commit

Permalink
Merge pull request #68 from joshbeard/fix/category-null
Browse files Browse the repository at this point in the history
fix: category resource nil reference to API response
  • Loading branch information
joshbeard authored Sep 22, 2023
2 parents cbaf49e + 7511471 commit 28e1c57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme/category_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (r *categoryResource) Read(
apiRequestOptions(types.StringValue(version)),
)
if err != nil {
if apiResponse.APIErrorResponse.Error == "CATEGORY_NOTFOUND" {
if apiResponse != nil && apiResponse.APIErrorResponse.Error == "CATEGORY_NOTFOUND" {
resp.State.RemoveResource(ctx)

return
Expand Down

0 comments on commit 28e1c57

Please sign in to comment.