BerriAI/litellm · error · HTTPException
Failed to fetch WAU analytics: {e}
Error message
Failed to fetch WAU analytics: {e} What it means
HTTPException wrapping any unexpected exception while computing weekly-active-user (WAU) analytics from the tag-spend/verification-token join — query failures, validation errors on returned rows, or date-bucketing problems. The exception text is embedded and the WAU endpoint aborts.
Source
Thrown at litellm/proxy/management_endpoints/user_agent_analytics_endpoints.py:420
"""
db_response: Final = _ACTIVE_USERS_ROWS.validate_python(await _query_raw(prisma_client, sql_query, *params))
results: Final = [
TagActiveUsersResponse(
tag=row.tag,
active_users=row.active_users,
date=row.date, # This will be "Week 1 (Jan 15)", "Week 2 (Jan 8)", etc.
period_start=row.period_start,
period_end=row.period_end,
)
for row in db_response
]
return ActiveUsersAnalyticsResponse(results=results)
except Exception as e:
raise HTTPException(
status_code=500,
detail=f"Failed to fetch WAU analytics: {e}",
)
@router.get(
"/tag/mau",
response_model=ActiveUsersAnalyticsResponse,
tags=["tag management", "user agent analytics"],
dependencies=[Depends(user_api_key_auth)],
)
async def get_monthly_active_users(
tag_filter: str | None = Query(
default=None,
description="Filter by specific tag (optional)",
),
tag_filters: list[str] | None = Query(
default=None,View on GitHub (pinned to 77b7c6c40c)
Solutions
- Check the embedded error and proxy logs; verify the database connection and date parameters, then retry.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/user_agent_analytics_endpoints.py:420 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/1f823aea24e0559c.
Report an issue: GitHub.