blu3-bird/Shopping-on-tuesday
[Bug] Incorrect exception handling in admin routes
Aberta
#47 aberto em 10 de dez. de 2025
frontendhelp wantedinvalid🐕bug🐭good first issue🫎enhancement
Métricas do repositório
- Stars
- (5 estrelas)
- Métricas de merge de PR
- (Métricas PR pendentes)
Description
[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