BerriAI/litellm · error · Exception

Not connected to DB!

Error message

Not connected to DB!

What it means

Error "Not connected to DB!" thrown in BerriAI/litellm.

Source

Thrown at litellm/integrations/email_alerting.py:24

from typing import Final

from litellm._logging import verbose_logger, verbose_proxy_logger
from litellm.proxy._types import WebhookEvent
from litellm.repositories.team_repository import TeamRepository

# we use this for the email header, please send a test email if you change this. verify it looks good on email
LITELLM_LOGO_URL: Final = "https://litellm-listing.s3.amazonaws.com/litellm_logo.png"
LITELLM_SUPPORT_CONTACT: Final = "support@berri.ai"


async def get_all_team_member_emails(team_id: str | None = None) -> list:
    verbose_logger.debug("Email Alerting: Getting all team members for team_id=%s", team_id)
    if team_id is None:
        return []
    from litellm.proxy.proxy_server import prisma_client

    if prisma_client is None:
        raise Exception("Not connected to DB!")

    team_row: Final = await TeamRepository(prisma_client).table.find_unique(
        where={
            "team_id": team_id,
        }
    )

    if team_row is None:
        return []

    _team_members: Final = team_row.members_with_roles
    verbose_logger.debug(
        "Email Alerting: Got team members for team_id=%s Team Members: %s",
        team_id,
        _team_members,
    )
    _team_member_user_ids: Final[list[str]] = []
    for member in _team_members:

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Connect a database to the proxy (set DATABASE_URL) before using email alerting.

When it happens

Trigger: Thrown at litellm/integrations/email_alerting.py:24 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/91d081f717c471d7. Report an issue: GitHub.