Skip to content

[Bug] get_session crashes with AttributeError when database reconnection fails #47

Description

@Jaswanth-006

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions