The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
show error from /spend/tags
Ishaan Jaff21a89f15dee8
diff --git a/litellm/proxy/spend_tracking/spend_management_endpoints.py b/litellm/proxy/spend_tracking/spend_management_endpoints.pyindex 9e0ef877e8a..7c8921c5d04 100644--- a/litellm/proxy/spend_tracking/spend_management_endpoints.py+++ b/litellm/proxy/spend_tracking/spend_management_endpoints.py@@ -1236,6 +1236,7 @@ async def global_view_spend_tags(-H "Authorization: Bearer sk-1234"```"""+ import tracebackfrom enterprise.utils import ui_get_spend_by_tagsfrom litellm.proxy.proxy_server import prisma_client@@ -1262,9 +1263,11 @@ async def global_view_spend_tags(return responseexcept Exception as e:+ error_trace = traceback.format_exc()+ error_str = str(e) + "\n" + error_traceif isinstance(e, HTTPException):raise ProxyException(- message=getattr(e, "detail", f"/spend/tags Error({str(e)})"),+ message=getattr(e, "detail", f"/spend/tags Error({error_str})"),type="internal_error",param=getattr(e, "param", "None"),code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR),@@ -1272,7 +1275,7 @@ async def global_view_spend_tags(elif isinstance(e, ProxyException):raise eraise ProxyException(- message="/spend/tags Error" + str(e),+ message="/spend/tags Error" + error_str,type="internal_error",param=getattr(e, "param", "None"),code=status.HTTP_500_INTERNAL_SERVER_ERROR,