PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

fix: improve SQLite error handling in metadata.py

Open ajithhraj opened this issue 8 months ago • 4 comments

metadata.py has two problems:

Uses broad except Exception instead of sqlite3.Error Uses print() instead of logging for error reporting db_create_metadata_table has no exception handling at all

I'd like to fix this. Assigning myself.

ajithhraj avatar Mar 15 '26 05:03 ajithhraj

👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)

github-actions[bot] avatar Mar 15 '26 05:03 github-actions[bot]

Hi @rohan-pandeyy ! I would like to work on this issue.

My approach will be to:

  1. Review metadata.py for any broad Exception blocks or raw print() statements used during database operations.
  2. Replace them with specific sqlite3.Error exception handling.
  3. Integrate the project's standard logger (logger.error()) instead of raw prints to ensure error reporting consistency with the rest of the backend.

Could you please assign this issue to me? Thanks!

Dotify71 avatar Jun 12 '26 07:06 Dotify71

@Dotify71 Are you still working on this issue?

VanshajPoonia avatar Jun 27 '26 18:06 VanshajPoonia

Hi @VanshajPoonia I have the fix ready just waiting for a maintainer to see my approach and assign it to me if they like so

Dotify71 avatar Jun 27 '26 18:06 Dotify71