pyupio / safety

Safety checks Python dependencies for known security vulnerabilities and suggests the proper remediations for vulnerabilities detected.
https://safetycli.com/product/safety-cli
MIT License
1.68k stars 142 forks source link

Enhance Error Messages #577

Open dylanpulver opened 4 weeks ago

dylanpulver commented 4 weeks ago

Clear and informative error messages are essential for a good user experience. We are looking for contributions that improve existing error messages, making them more descriptive and helpful for users. If you improve an error message, please create a new issue to describe the enhancements you’ve made and link it back to this general error message improvement issue.

github-actions[bot] commented 4 weeks ago

Hi @dylanpulver, thank you for opening this issue!

We appreciate your effort in reporting this. Our team will review it and get back to you soon. If you have any additional details or updates, feel free to add them to this issue.

Note: If this is a serious security issue that could impact the security of Safety CLI users, please email security@safetycli.com immediately.

Thank you for contributing to Safety CLI!

rpattekar commented 4 weeks ago

take

rpattekar commented 4 weeks ago

@dylanpulver Can someone please point out to me one error message that would be a good candidate for enhancing? Just so I have an idea of what to look for...

dylanpulver commented 3 weeks ago

Hi @rpattekar, Absolutely!

For this one we welcome updates to existing error messages as well as introducing new error messages to the codebase.

I will post a few approaches here.

  1. searching LOG.exception in the codebase We have 20 results here which can likely be improved upon!:

    image
  2. searching try We have ~100 try except loops but not all except blocks have logging currently.

    image
  3. searching LOG.error We have 8 cases of LOG.error in the codebase that could likely be improved!

    image

These are just starting places/ideas to consider for improving existing logging and adding more logging. We welcome any ideas to improve our error messages across the codebase! Thank you!