{"record":{"id":"a48ee6adf8f62ce4","repo":"BerriAI/litellm","slug":"failed-to-fetch-mau-analytics-e","errorCode":null,"errorMessage":"Failed to fetch MAU analytics: {e}","messagePattern":"Failed to fetch MAU analytics: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/management_endpoints/user_agent_analytics_endpoints.py","lineNumber":541,"sourceCode":"        \"\"\"\n\n        db_response: Final = _ACTIVE_USERS_ROWS.validate_python(await _query_raw(prisma_client, sql_query, *params))\n\n        results: Final = [\n            TagActiveUsersResponse(\n                tag=row.tag,\n                active_users=row.active_users,\n                date=row.date,  # This will be \"Month 1 (Jan)\", \"Month 2 (Dec)\", etc.\n                period_start=row.period_start,\n                period_end=row.period_end,\n            )\n            for row in db_response\n        ]\n\n        return ActiveUsersAnalyticsResponse(results=results)\n\n    except Exception as e:\n        raise HTTPException(\n            status_code=500,\n            detail=f\"Failed to fetch MAU analytics: {e}\",\n        )\n\n\n@router.get(\n    \"/tag/summary\",\n    response_model=TagSummaryResponse,\n    tags=[\"tag management\", \"user agent analytics\"],\n    dependencies=[Depends(user_api_key_auth)],\n)\nasync def get_tag_summary(\n    start_date: str = Query(description=\"Start date in YYYY-MM-DD format\"),\n    end_date: str = Query(description=\"End date in YYYY-MM-DD format\"),\n    tag_filter: str | None = Query(\n        default=None,\n        description=\"Filter by specific tag (optional)\",\n    ),","sourceCodeStart":523,"sourceCodeEnd":559,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/user_agent_analytics_endpoints.py#L523-L559","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/user_agent_analytics_endpoints.py:541 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the embedded error and proxy logs; verify the database connection and date parameters, then retry."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}