visidata icon indicating copy to clipboard operation
visidata copied to clipboard

[http-] on errors, show fail msg instead of traceback

Open midichef opened this issue 3 months ago • 0 comments

When opening an URL causes an error, the user is shown a long traceback:

vd https://example.com/asdf
...
File "/usr/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

This PR changes it to a shorter error:

vd https://example.com/asdf
saul.pw/VisiData v3.1dev
Support VisiData: https://github.com/sponsors/saulpw
cannot open URL: HTTP Error 404: Not Found

midichef avatar Mar 25 '24 04:03 midichef