BerriAI/litellm · error · HTTPException
Failed to fetch MAU analytics: {e}
Error message
Failed to fetch MAU analytics: {e} What it means
HTTPException wrapping any unexpected exception while computing monthly-active-user (MAU) analytics from the tag-spend/verification-token join — query failures, validation errors on returned rows, or month-bucketing problems. The exception text is embedded and the MAU endpoint aborts.
Source
Thrown at litellm/proxy/management_endpoints/user_agent_analytics_endpoints.py:541
"""
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 "Month 1 (Jan)", "Month 2 (Dec)", 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 MAU analytics: {e}",
)
@router.get(
"/tag/summary",
response_model=TagSummaryResponse,
tags=["tag management", "user agent analytics"],
dependencies=[Depends(user_api_key_auth)],
)
async def get_tag_summary(
start_date: str = Query(description="Start date in YYYY-MM-DD format"),
end_date: str = Query(description="End date in YYYY-MM-DD format"),
tag_filter: str | None = Query(
default=None,
description="Filter by specific tag (optional)",
),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:541 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/a48ee6adf8f62ce4.
Report an issue: GitHub.