BerriAI/litellm · error · HTTPException

You are not a member of the team that owns this submission

Error message

You are not a member of the team that owns this submission

What it means

Raised by the get-guardrail-submission endpoint when the submission row exists but the caller is a non-admin whose team does not own the submission. Submissions are team-scoped: an admin view sees everything, everyone else must belong to the owning team; otherwise the request is rejected (403-class) even though the id is valid.

Source

Thrown at litellm/proxy/guardrails/guardrail_endpoints.py:979

    guardrail_id: str,
    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
    """Get a single guardrail submission by id. Non-admins may only access submissions for teams they belong to."""
    from litellm.proxy.proxy_server import prisma_client

    if prisma_client is None:
        raise HTTPException(status_code=500, detail="Prisma client not initialized")

    is_admin: Final = _user_has_admin_view(user_api_key_dict)

    try:
        row: Final = await _guardrails_table(prisma_client).find_unique(where={"guardrail_id": guardrail_id})
        if row is None:
            raise HTTPException(status_code=404, detail="Guardrail submission not found")
        if not is_admin:
            visible_team_ids: Final = await _get_user_team_ids(user_api_key_dict)
            if row.team_id is None or row.team_id not in visible_team_ids:
                raise HTTPException(
                    status_code=403,
                    detail="You are not a member of the team that owns this submission",
                )
        return _row_to_submission_item(row)
    except HTTPException:
        raise
    except Exception as e:
        verbose_proxy_logger.exception("Error getting guardrail submission: %s", e)
        raise HTTPException(status_code=500, detail=str(e))


@router.post(
    "/guardrails/submissions/{guardrail_id}/approve",
    tags=["Guardrails"],
)
async def approve_guardrail_submission(
    guardrail_id: str,
    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Use credentials for a user who belongs to the team that owns the submission.
  2. Ask a team member or admin to act on the submission.

Example fix

Retry with a key belonging to a member of the owning team.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/guardrails/guardrail_endpoints.py:979 when the library encounters an invalid state.

Common situations: The caller is not a member of the team that owns the guardrail submission.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/4d64a8c40e26c595. Report an issue: GitHub.