blu3-bird/Shopping-on-tuesday
[Bug] Incorrect exception handling in admin routes
Offen
#47 geöffnet am 10.12.2025
frontendhelp wantedinvalid🐕bug🐭good first issue🫎enhancement
Repository-Metriken
- Stars
- (5 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
[Bug] Incorrect exception handling in admin routes
Problem
app/admin/routes.py - Exception handling issues:
except (DataError, SQLAlchemyError, OperationalError, IntegrityError) as e:
SQLAlchemyError is parent class, others are redundant
-Exception variable e unused (no logging) -Repeated in add_product, edit_product, delete_product
Fix Needed
-Use only SQLAlchemyError
-Add error logging with exception details
Labels: bug, error-handling