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

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

Merged
merged 1 commit into from May 20, 2024

Conversation

midichef
Copy link
Contributor

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

Copy link
Owner

@saulpw saulpw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this makes total sense to me. Thanks for improving our error handling!

@anjakefala anjakefala merged commit e31c90c into saulpw:develop May 20, 2024
13 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants