Skip to content

Handle GitHub server error #4

@aksh1618

Description

@aksh1618

The action is failing in case of 502 by Github, need to handle the exception and retry. Stacktrace:

Using default stats type: level-xp
Traceback (most recent call last):
  File "codestats_box.py", line 269, in <module>
    main()
  File "codestats_box.py", line 248, in main
    update_gist(title, content)
  File "codestats_box.py", line 215, in update_gist
    gist.edit(title, {old_title: InputFileContent(content, title)})
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/github/Gist.py", line 260, in edit
    headers, data = self._requester.requestJsonAndCheck(
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/github/Requester.py", line 317, in requestJsonAndCheck
    return self.__check(
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/github/Requester.py", line 342, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 502 {"message": "Server Error"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions