BerriAI/litellm · error · HTTPException
Run '{run_id}' not found
Error message
Run '{run_id}' not found What it means
HTTPException(404) from the _require_run helper: no workflow run row with the given run_id exists in the database (or, for non-admin callers, the run exists but is not owned by the caller's key, which is reported the same way to avoid leaking existence). The workflow endpoint cannot proceed without a target run.
Source
Thrown at litellm/proxy/management_endpoints/workflow_management_endpoints.py:181
)
else:
rows = await WorkflowMessageRepository(prisma_client).table.find_many(
where={"run_id": run_id},
order={"sequence_number": "desc"},
take=1,
)
return (rows[0].sequence_number + 1) if rows else 0
async def _require_run(
prisma_client: object,
run_id: str,
user_api_key_dict: UserAPIKeyAuth | None = None,
) -> _RunRow:
"""Return the run or raise 404. For non-admin callers, also enforce key ownership."""
run: Final[_RunRow | None] = await WorkflowRunRepository(prisma_client).table.find_unique(where={"run_id": run_id})
if run is None:
raise HTTPException(status_code=404, detail=f"Run '{run_id}' not found")
if user_api_key_dict is not None and not _is_admin(user_api_key_dict):
caller: Final = _caller_key(user_api_key_dict)
if not caller or run.created_by != caller:
raise HTTPException(status_code=404, detail=f"Run '{run_id}' not found")
return run
# ---------------------------------------------------------------------------
# Endpoints
# ---------------------------------------------------------------------------
@router.post(
"/v1/workflows/runs",
tags=["workflow management"],
dependencies=[Depends(user_api_key_auth)],
)
async def create_workflow_run(View on GitHub (pinned to 77b7c6c40c)
Solutions
- Verify the run_id exists (list runs) before querying it.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/workflow_management_endpoints.py:181 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/d93ab9c1664cc62f.
Report an issue: GitHub.