You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case that the stored IP address or credentials are invalid, the CLI command currently produces somewhat unsavory output:
For an invalid IP address:
$ wva get /
Traceback (most recent call last):
File "/home/posborne/.local/bin/wva", line 9, in <module>
load_entry_point('wva==0.1.0', 'console_scripts', 'wva')()
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/wva/cli.py", line 552, in main
cli(auto_envvar_prefix="WVA")
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
return self.main(*args, **kwargs)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/wva/cli.py", line 196, in get
cli_pprint(http_client.get(uri))
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/wva/http_client.py", line 135, in get
return self.request("GET", uri, **kwargs)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/wva/http_client.py", line 113, in request
response = self.raw_request(method, uri, **kwargs)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/wva/http_client.py", line 95, in raw_request
six.raise_from(WVAHttpRequestError(e), e)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/six.py", line 692, in raise_from
raise value
wva.exceptions.WVAHttpRequestError: ('Connection aborted.', error(113, 'No route to host'))
And for a credentials problem:
Traceback (most recent call last):
File "/home/posborne/.local/bin/wva", line 9, in <module>
load_entry_point('wva==0.1.0', 'console_scripts', 'wva')()
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/wva/cli.py", line 552, in main
cli(auto_envvar_prefix="WVA")
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
return self.main(*args, **kwargs)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/wva/cli.py", line 541, in authorize
http_client.put(authorized_keys_uri, authorized_key_contents)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/wva/http_client.py", line 162, in put
return self.request("PUT", uri, data=data, **kwargs)
File "/home/posborne/.local/venvs/wva/local/lib/python2.7/site-packages/wva/http_client.py", line 116, in request
raise exception_class(response)
wva.exceptions.WVAHttpUnauthorizedError: Unexpected HTTP status 401 'WVAHttpUnauthorizedError'
In the case of an HTTP exception, a stack trace seems suboptimal. In addition, it would be nice to give hints to the user as to what may have gone wrong and what can be done to fix it. For both of these cases, telling the user that runngin wva cliconfig clear would be very helpful information.
The text was updated successfully, but these errors were encountered:
In the case that the stored IP address or credentials are invalid, the CLI command currently produces somewhat unsavory output:
For an invalid IP address:
And for a credentials problem:
In the case of an HTTP exception, a stack trace seems suboptimal. In addition, it would be nice to give hints to the user as to what may have gone wrong and what can be done to fix it. For both of these cases, telling the user that runngin
wva cliconfig clear
would be very helpful information.The text was updated successfully, but these errors were encountered: