blu3-bird/Shopping-on-tuesday

[Bug] Incorrect exception handling in admin routes

Ouverte

#47 ouverte le 10 déc. 2025

 (0 commentaire) (0 réaction) (0 personne assignée)CSS (16 forks)auto 404
frontendhelp wantedinvalid🐕bug🐭good first issue🫎enhancement

Métriques du dépôt

Stars
 (5 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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

Guide contributeur