blu3-bird/Shopping-on-tuesday
[Bug] Incorrect exception handling in admin routes
Aperta
#47 aperta il 10 dic 2025
frontendhelp wantedinvalid🐕bug🐭good first issue🫎enhancement
Metriche repository
- Star
- (5 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
[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