Describe the Bug
In app/core/database.py, if a database connection is lost and the driver attempts to reconnect, if the reconnection fails it sets self._driver = None.
Immediately after, it calls self._driver.session(), which causes an AttributeError instead of a database connection exception, hiding the root cause.
Expected Behavior
The database driver should explicitly raise a ConnectionError or HTTPException if it cannot reconnect to Neo4j.
Describe the Bug
In
app/core/database.py, if a database connection is lost and the driver attempts to reconnect, if the reconnection fails it setsself._driver = None.Immediately after, it calls
self._driver.session(), which causes anAttributeErrorinstead of a database connection exception, hiding the root cause.Expected Behavior
The database driver should explicitly raise a
ConnectionErrororHTTPExceptionif it cannot reconnect to Neo4j.