BerriAI/litellm · error · ProxyException
"/spend/tags Error" + str(e)
Error message
"/spend/tags Error" + str(e)
What it means
Error ""/spend/tags Error" + str(e)" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/spend_tracking/spend_management_endpoints.py:442
COUNT(*) AS log_count,
SUM(spend) AS total_spend
FROM "LiteLLM_SpendLogs"
GROUP BY individual_request_tag;
"""
response: Final = await get_spend_by_tags(start_date=start_date, end_date=end_date, prisma_client=prisma_client)
return response
except Exception as e:
if isinstance(e, HTTPException):
raise ProxyException(
message=getattr(e, "detail", f"/spend/tags Error({e})"),
type="internal_error",
param=getattr(e, "param", "None"),
code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR),
)
elif isinstance(e, ProxyException):
raise e
raise ProxyException(
message="/spend/tags Error" + str(e),
type="internal_error",
param=getattr(e, "param", "None"),
code=status.HTTP_500_INTERNAL_SERVER_ERROR,
)
async def get_global_activity_internal_user(
user_api_key_dict: UserAPIKeyAuth, start_date: datetime, end_date: datetime
):
from litellm.proxy.proxy_server import prisma_client
if prisma_client is None:
raise HTTPException(status_code=500, detail={"error": "No db connected"})
user_id: Final = user_api_key_dict.user_id
if user_id is None:
raise HTTPException(status_code=500, detail={"error": "No user_id found"})View on GitHub (pinned to 77b7c6c40c)
Solutions
- Check the appended error and logs; verify date filters and DB connectivity, then retry /spend/tags.
When it happens
Trigger: Thrown at litellm/proxy/spend_tracking/spend_management_endpoints.py:442 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/26c27cf5fc36faf0.
Report an issue: GitHub.