-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
93 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters