{"record":{"id":"d13d3a375e8e94fc","repo":"BerriAI/litellm","slug":"team-id-team-id-does-not-exist","errorCode":null,"errorMessage":"Team id = {team_id} does not exist.","messagePattern":"Team id = (.+?) does not exist\\.","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_callback_endpoints.py","lineNumber":411,"sourceCode":"        -H 'Authorization: Bearer sk-1234'\n    ```\n\n\n    \"\"\"\n    try:\n        from litellm.proxy.proxy_server import (\n            prisma_client,\n            proxy_logging_obj,\n            user_api_key_cache,\n        )\n\n        if prisma_client is None:\n            raise HTTPException(status_code=500, detail={\"error\": \"No db connected\"})\n\n        # Check if team exists\n        _existing_team = await prisma_client.get_data(team_id=team_id, table_name=\"team\", query_type=\"find_unique\")\n        if _existing_team is None:\n            raise HTTPException(\n                status_code=404,\n                detail={\"error\": f\"Team id = {team_id} does not exist.\"},\n            )\n\n        # IDOR guard: only proxy admins / org admins / team admins of THIS\n        # team may disable its logging — otherwise any authenticated key\n        # holder can silence audit logging for any team.\n        await _verify_team_access(\n            team_obj=LiteLLM_TeamTable(**_existing_team.model_dump()),\n            user_api_key_dict=user_api_key_dict,\n        )\n\n        # Update team metadata to disable logging\n        team_metadata = _existing_team.metadata\n        before_metadata: Final = copy.deepcopy(team_metadata)\n        team_callback_settings: Final = team_metadata.get(\"callback_settings\", {})\n        team_callback_settings_obj: Final = TeamCallbackMetadata(**team_callback_settings)\n","sourceCodeStart":393,"sourceCodeEnd":429,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_callback_endpoints.py#L393-L429","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_callback_endpoints.py:411 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an existing team id; verify via /team/list."],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}