BerriAI/litellm · error · HTTPException
Team id = {team_id} does not exist.
Error message
Team id = {team_id} does not exist. What it means
Existence check at the start of a team-scoped callback endpoint. prisma_client.get_data with query_type=find_unique returned None for the given team_id, meaning no team table row matches, so the endpoint cannot proceed to read/modify that team's callback settings. Typically caused by a deleted team or a mistyped/foreign team_id in the path. Verify the team_id exists via /team/info before retrying.
Source
Thrown at litellm/proxy/management_endpoints/team_callback_endpoints.py:411
-H 'Authorization: Bearer sk-1234'
```
"""
try:
from litellm.proxy.proxy_server import (
prisma_client,
proxy_logging_obj,
user_api_key_cache,
)
if prisma_client is None:
raise HTTPException(status_code=500, detail={"error": "No db connected"})
# Check if team exists
_existing_team = await prisma_client.get_data(team_id=team_id, table_name="team", query_type="find_unique")
if _existing_team is None:
raise HTTPException(
status_code=404,
detail={"error": f"Team id = {team_id} does not exist."},
)
# IDOR guard: only proxy admins / org admins / team admins of THIS
# team may disable its logging — otherwise any authenticated key
# holder can silence audit logging for any team.
await _verify_team_access(
team_obj=LiteLLM_TeamTable(**_existing_team.model_dump()),
user_api_key_dict=user_api_key_dict,
)
# Update team metadata to disable logging
team_metadata = _existing_team.metadata
before_metadata: Final = copy.deepcopy(team_metadata)
team_callback_settings: Final = team_metadata.get("callback_settings", {})
team_callback_settings_obj: Final = TeamCallbackMetadata(**team_callback_settings)
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Use an existing team id; verify via /team/list.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/team_callback_endpoints.py:411 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/d13d3a375e8e94fc.
Report an issue: GitHub.