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

alignak-backend-cli displays a traceback when can't talk to backend #42

Open
mohierf opened this issue Jun 8, 2017 · 0 comments
Open

Comments

@mohierf
Copy link
Collaborator

mohierf commented Jun 8, 2017

From @arthurlogilab, initially opened as Alignak-monitoring-contrib/alignak-webui#275


out of the box I don't think alignak-backend-cli should display a python traceback to the user when it can't reach the default backend.

$ alignak-backend-cli 
INFO:alignak_backend_client.client:Authenticating...
ERROR:alignak_backend_client.client:Backend connection error, error: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /login (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7ff04afb8690>: Failed to establish a new connection: [Errno 111] Connection refused',))
ERROR:alignak_backend_client.client:Exception: Backend error code 1000: Backend connection error
Traceback (most recent call last):
  File "/home/arthur/.virtualenvs/alignak/local/lib/python2.7/site-packages/alignak_backend_client/backend_client.py", line 398, in initialize
    self.backend.login(self.username, self.password)
  File "/home/arthur/.virtualenvs/alignak/local/lib/python2.7/site-packages/alignak_backend_client/client.py", line 176, in login
    raise BackendException(1000, "Backend connection error")
BackendException: Backend error code 1000: Backend connection error
ERROR:alignak_backend_client.client:Response: None
Access denied!
~~~~~~~~~~~~~~~~~~~~~~~~~~
Exiting with error code: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant