Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github_repository_collaborator error on read when repository 404 #343

Closed
paultyng opened this issue Feb 3, 2020 · 0 comments · Fixed by #348
Closed

github_repository_collaborator error on read when repository 404 #343

paultyng opened this issue Feb 3, 2020 · 0 comments · Fixed by #348
Labels
Good first issue Good for newcomers Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@paultyng
Copy link
Contributor

paultyng commented Feb 3, 2020

When a repository is deleted manually, a read for a collaborator resource on that repository errors instead of just removing from state on a 404:

Error: GET https://api.github.com/repos/terraform-providers/terraform-provider-atlas/invitations?per_page=100: 404 Not Found []

If the repo is 404, this should exit gracefully and just set ID to empty string, not propagate the error:

https://github.com/terraform-providers/terraform-provider-github/blob/70683693d1a602276f73ce687b1faec9e3607416/github/resource_github_repository_collaborator.go#L100

here is how it is done on the repo resource itself:

https://github.com/terraform-providers/terraform-provider-github/blob/70683693d1a602276f73ce687b1faec9e3607416/github/resource_github_repository.go#L276-L280

@paultyng paultyng added Type: Bug Something isn't working as documented Status: Up for grabs Issues that are ready to be worked on by anyone Good first issue Good for newcomers labels Feb 3, 2020
paultyng added a commit that referenced this issue Feb 5, 2020
kfcampbell pushed a commit to kfcampbell/terraform-provider-github that referenced this issue Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Good for newcomers Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant