fridex / githubcap

A CLI and a library for communicating with GitHub API v3 safely and sanely
http://githubcap.readthedocs.io
Apache License 2.0
1 stars 2 forks source link

issues-listing without args failure #7

Open jayvdb opened 4 years ago

jayvdb commented 4 years ago

Slightly different errors, but that may be temperamental server side or temporal side effects.

Without token:

> /usr/bin/githubcap-cli issues-listing
2020-01-07 13:01:48,367 [3035] CRITICAL root: Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 64, in call
    response.raise_for_status()
  File "/home/jayvdb/.local/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.github.com/issues?page=1&per_page=100&filter=all&state=all&sort=created&direction=desc&milestone=*&assignee=*

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/githubcap-cli", line 11, in <module>
    load_entry_point('githubcap==0.0.0', 'console_scripts', 'githubcap-cli')()
  File "/usr/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/githubcap/cli.py", line 172, in issues_listing
    _print_result(list(reported_issues), not no_pretty)
  File "/usr/lib/python3.7/site-packages/githubcap/resources/issues.py", line 63, in list_assigned_issues
    for item in self._do_listing(base_uri):
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 97, in _do_listing
    response, headers = self.get(uri)
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 76, in get
    return cls.call(*args, **kwargs, method='GET')
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 66, in call
    raise HTTPError(response.json(), response.status_code) from exc
githubcap.exceptions.HTTPError: Not Found

With token:

/usr/bin/githubcap-cli -t ... issues-listing 
2020-01-07 13:03:38,216 [3670] CRITICAL root: Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 64, in call
    response.raise_for_status()
  File "/home/jayvdb/.local/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.github.com/issues?page=1&per_page=100&filter=all&state=all&sort=created&direction=desc&milestone=*&assignee=*

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/githubcap-cli", line 11, in <module>
    load_entry_point('githubcap==0.0.0', 'console_scripts', 'githubcap-cli')()
  File "/usr/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/githubcap/cli.py", line 172, in issues_listing
    _print_result(list(reported_issues), not no_pretty)
  File "/usr/lib/python3.7/site-packages/githubcap/resources/issues.py", line 63, in list_assigned_issues
    for item in self._do_listing(base_uri):
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 97, in _do_listing
    response, headers = self.get(uri)
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 76, in get
    return cls.call(*args, **kwargs, method='GET')
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 66, in call
    raise HTTPError(response.json(), response.status_code) from exc
githubcap.exceptions.HTTPError: Server Error