Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap 404 errors when connecting to wrong server in better exception #31

Open
Grokzen opened this issue Jan 9, 2020 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Grokzen
Copy link
Contributor

Grokzen commented Jan 9, 2020

Environment

  • Python version: 3.6
  • Phabfive version: 0.1.0

Steps to Reproduce

$ PHAB_URL=http://google.se/api/ phabfive diffusion repo list
Traceback (most recent call last):
  File "/home/mai/.virtualenvs/phabfive-github/bin/phabfive", line 11, in <module>
    load_entry_point('phabfive', 'console_scripts', 'phabfive')()
  File "/home/mai/phabfive-github/phabfive/cli.py", line 176, in cli_entrypoint
    sys.exit(run(cli_args, sub_args))
  File "/home/mai/phabfive-github/phabfive/cli.py", line 139, in run
    d = diffusion.Diffusion()
  File "/home/mai/phabfive-github/phabfive/diffusion.py", line 17, in __init__
    super(Diffusion, self).__init__()
  File "/home/mai/phabfive-github/phabfive/core.py", line 77, in __init__
    self.verify_connection()
  File "/home/mai/phabfive-github/phabfive/core.py", line 83, in verify_connection
    result = self.phab.user.whoami()
  File "/home/mai/.virtualenvs/phabfive-github/local/lib/python2.7/site-packages/phabricator/__init__.py", line 248, in __call__
    return self._request(**kwargs)
  File "/home/mai/.virtualenvs/phabfive-github/local/lib/python2.7/site-packages/phabricator/__init__.py", line 314, in _request
    'Bad response status: {0}'.format(response.status)
httplib.HTTPException: Bad response status: 404

Expected Behavior

Better wrapped exception

Observed Behavior

Bad wrapped exception

@Grokzen Grokzen added the bug Something isn't working label Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant