BerriAI/litellm · error · HTTPException

Guardrail submission not found

Error message

Guardrail submission not found

What it means

Raised by the get-guardrail-submission endpoint when no row matches guardrail_id in the guardrails table. Admins and team members alike receive this 404; it simply means the submission identifier is unknown — mistyped id, submission deleted, or created on a different proxy/database.

Source

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

    tags=["Guardrails"],
    response_model=GuardrailSubmissionItem,
)
async def get_guardrail_submission(
    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"],

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the submission ID and list existing submissions to find the correct one.

Example fix

List guardrail submissions via the submissions endpoint and retry with a valid ID.
Defensive patterns

Strategy: validation

When it happens

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

Common situations: The referenced guardrail submission ID does not exist.


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