BerriAI/litellm · error · HTTPException

f"No db connected. prisma client={prisma_client}"

Error message

f"No db connected. prisma client={prisma_client}"

What it means

Error "f"No db connected. prisma client={prisma_client}"" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/internal_user_endpoints.py:2069

        team: Optional[str]
            Filter users by team id. Will match if user has this team in their teams array.
        page: int
            The page number to return
        page_size: int
            The number of items per page
        sort_by: Optional[str]
            Column to sort by (e.g. 'user_id', 'user_email', 'created_at', 'spend')
        sort_order: Optional[str]
            Sort order ('asc' or 'desc')
    """
    from litellm.proxy.proxy_server import (
        prisma_client,
        proxy_logging_obj,
        user_api_key_cache,
    )

    if prisma_client is None:
        raise HTTPException(
            status_code=500,
            detail={"error": f"No db connected. prisma client={prisma_client}"},
        )

    # Server-side authorization: proxy admins see all, org admins see only their org(s)
    organization_ids = await _authorize_user_list_request(
        user_api_key_dict=user_api_key_dict,
        organization_ids=organization_ids,
        prisma_client=prisma_client,
        user_api_key_cache=user_api_key_cache,
        proxy_logging_obj=proxy_logging_obj,
    )

    # Calculate skip and take for pagination
    skip: Final = (page - 1) * page_size

    # Build where conditions based on provided parameters
    where_conditions: dict[str, object] = {}

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Set DATABASE_URL to a valid PostgreSQL connection string and restart the proxy.
  2. Verify the database is reachable from the proxy host and credentials are correct.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/internal_user_endpoints.py:2069 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/8ba479868a9d3547. Report an issue: GitHub.