gh-search
gh-search copied to clipboard
github.GithubException.GithubException: 404 {"message": "Rate limiting is not enabled.",
I'm using gh-search against a Github Enterprise instance that does not have rate limits enabled. I get this exception thrown:
Traceback (most recent call last):
File "/opt/homebrew/bin/gh-search", line 8, in <module>
sys.exit(cli())
^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ghsearch/cli.py", line 82, in cli
run(
File "/opt/homebrew/lib/python3.11/site-packages/ghsearch/main.py", line 59, in run
raise ex
File "/opt/homebrew/lib/python3.11/site-packages/ghsearch/main.py", line 48, in run
results = gh_search.get_filtered_results(query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ghsearch/gh_search.py", line 56, in get_filtered_results
rate_limit = self.client.get_rate_limit()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/github/MainClass.py", line 214, in get_rate_limit
headers, data = self.__requester.requestJsonAndCheck("GET", "/rate_limit")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/github/Requester.py", line 315, in requestJsonAndCheck
return self.__check(
^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/github/Requester.py", line 340, in __check
raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 404 {"message": "Rate limiting is not enabled.", "documentation_url": "https://docs.github.com/[email protected]/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user"}