<module>: Unhandled exception: Traceback (most recent call last):
File "/home/runner/work/ccos-scripts/ccos-scripts/./move_closed_issues.py", line 101, in <module>
main()
File "/home/runner/work/ccos-scripts/ccos-scripts/./move_closed_issues.py", line 96, in main
move_cards(args, github, backlog, done)
File "/home/runner/work/ccos-scripts/ccos-scripts/./move_closed_issues.py", line 70, in move_cards
content = card.get_content(content_type="Issue")
File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/github/ProjectCard.py", line 135, in get_content
headers, data = self._requester.requestJsonAndCheck("GET", url)
File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/github/Requester.py", line 442, in requestJsonAndCheck
return self.__check(
File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/github/Requester.py", line 487, in __check
raise self.__createException(status, responseHeaders, data)
github.GithubException.GithubException: 502 {"message": "Server Error"}
Expectation
Mitigate intermittent server errors so that only "serious" errors are reported.
Description
Implement GitHub retries for 5xx status codes
Current solution
EnricoMi commented 2023-01-21 · API call returns 502 server error intermittently · Issue #2400 · PyGithub/PyGithub:
Future solution (v2)
In the future, the default value of the
retry
parameter will be better. The code necessary has been merged:github/GithubRetry.py (294c0cc)
However, at the time of writing, the code has not yet been released to stable (see Release v2.0.0-preview · PyGithub/PyGithub).
Reproduction
See occasional errors in GitHub Actions logs
move_closed_issues.py:
Expectation
Mitigate intermittent server errors so that only "serious" errors are reported.
Resolution