Skip to content

search_github fails to handle 404 errors #20

@ahouseholder

Description

@ahouseholder

See failed job in https://github.com/CERTCC/labyrinth/actions/runs/5527573575/job/14968312185

Log snippet follows

search_github --gh_token *** --start_date 2023-07-09 --end_date 2023-07-10  exploit
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.9.[17](https://github.com/CERTCC/labyrinth/actions/runs/5510599382/job/14918209014#step:6:18)/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.17/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.17/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.17/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.17/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.17/x64/lib
Starting 1 queries
Search: exploit pushed:[20](https://github.com/CERTCC/labyrinth/actions/runs/5510599382/job/14918209014#step:6:21)[23](https://github.com/CERTCC/labyrinth/actions/runs/5510599382/job/14918209014#step:6:24)-07-09..2023-07-10
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.17/x64/bin/search_github", line 202, in <module>
    main(search_str, args.start_date, args.end_date, args.overwrite)
  File "/opt/hostedtoolcache/Python/3.9.17/x64/bin/search_github", line 47, in main
    data = do_search(query, start_date, end_date)
  File "/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/labyrinth/search.py", line 79, in do_search
    data = r.raw_data
  File "/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/github/GithubObject.py", line 160, in raw_data
    self._completeIfNeeded()
  File "/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/github/GithubObject.py", line 390, in _completeIfNeeded
    self.__complete()
  File "/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/github/GithubObject.py", line 395, in __complete
    headers, data = self._requester.requestJsonAndCheck("GET", self._url.value)
  File "/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/github/Requester.py", line 442, in requestJsonAndCheck
    return self.__check(
  File "/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/github/Requester.py", line 487, in __check
    raise self.__createException(status, responseHeaders, data)
github.GithubException.UnknownObjectException: [40](https://github.com/CERTCC/labyrinth/actions/runs/5510599382/job/14918209014#step:6:42)4 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-repository"}
Error: Process completed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions