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

Handle GitHub API 204 response #2405

Merged
merged 1 commit into from May 11, 2023
Merged

Handle GitHub API 204 response #2405

merged 1 commit into from May 11, 2023

Conversation

ABrain7710
Copy link
Contributor

@ABrain7710 ABrain7710 commented May 10, 2023

Description

  • This endpoint, https://api.github.com/repos/{owner}/{repo}/contributors?state=all, which is used in grab_commiters returns a 204 No Content status and an empty string when there are not contributors. This was causing the response to be processed as a string, and a warning was logged because it was unable to be processed. Now if a 204 No Content status is returned by the Github API then all an empty list is returned with a status of Success

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Andrew Brain <andrewbrain2019@gmail.com>
Copy link
Member

@sgoggins sgoggins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we get an empty data return as a GitHub error and then get data with a retry in this case? If so should we do at least one retry?

@sgoggins sgoggins merged commit 97aeae6 into dev May 11, 2023
1 check passed
@ABrain7710 ABrain7710 deleted the handle-github-204 branch May 18, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants