{"record":{"id":"2945f4313b2299a2","repo":"BerriAI/litellm","slug":"team-not-found","errorCode":null,"errorMessage":"Team not found","messagePattern":"Team not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/pass_through_endpoints/pass_through_endpoints.py","lineNumber":3050,"sourceCode":"    Filter pass-through endpoints based on team's allowed_passthrough_routes metadata.\n\n    Args:\n        team_id: The team ID to check permissions for\n        pass_through_endpoints: List of endpoints to filter\n        prisma_client: Database client\n\n    Returns:\n        Filtered list of endpoints based on team permissions\n\n    Raises:\n        HTTPException: If team is not found\n    \"\"\"\n    # retrieve team from db\n    team: Final = await TeamRepository(prisma_client).table.find_unique(\n        where={\"team_id\": team_id},\n    )\n    if team is None:\n        raise HTTPException(\n            status_code=404,\n            detail={\"error\": \"Team not found\"},\n        )\n\n    # retrieve team metadata\n    team_metadata: Final = team.metadata\n    if team_metadata is not None and team_metadata.get(\"allowed_passthrough_routes\") is not None:\n        ## FILTER pass_through_endpoints by allowed_passthrough_routes\n        pass_through_endpoints = [\n            endpoint\n            for endpoint in pass_through_endpoints\n            if endpoint.path in team_metadata.get(\"allowed_passthrough_routes\")\n        ]\n\n    return pass_through_endpoints\n\n\n@router.get(","sourceCodeStart":3032,"sourceCodeEnd":3068,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py#L3032-L3068","documentation":"Permission filter for pass-through endpoints: the team_id used to filter allowed routes has no row in the database, so its allowed_passthrough_routes metadata cannot be read and the request is rejected.","triggerScenarios":"Thrown at litellm/proxy/pass_through_endpoints/pass_through_endpoints.py:3050 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the team first via /team/new, or correct the team_id in the request.","Verify the team_id exists with /team/list."],"exampleFix":null,"handlingStrategy":"type-guard","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"}