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
More improvements for custodia-cli error reporting
* Print command and name but not secret value
* Show host or unquoted path to socket
* Print inner exception for ConnectionError. It contains useful
information, e.g. TLS / cert errors.
$ PYTHONPATH=$(pwd) python -m custodia.cli ls /
ERROR: Custodia command 'ls /' failed.
Failed to connect to Unix socket '/var/run/custodia/custodia.sock':
('Connection aborted.', error(2, 'No such file or directory'))
$ PYTHONPATH=$(pwd) python -m custodia.cli --server http://localhost ls /
ERROR: Custodia command 'ls /' failed.
Failed to connect to 'localhost' (http):
HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fcb9aea2e10>: Failed to establish a new connection: [Errno 111] Connection refused',))
$ PYTHONPATH=$(pwd) python3 -m custodia.cli --server https://wrong.host.badssl.com/ ls /
ERROR: Custodia command 'ls /' failed.
Failed to connect to 'wrong.host.badssl.com' (https):
hostname 'wrong.host.badssl.com' doesn't match either of '*.badssl.com', 'badssl.com'
Closes: #131
Signed-off-by: Christian Heimes <[email protected]>
Reviewed-by: Raildo Mascena <[email protected]>
Closes: #144
0 commit comments