{"record":{"id":"5730dcf762bc3cbe","repo":"BerriAI/litellm","slug":"job-job-id-is-already-current-status","errorCode":null,"errorMessage":"Job {job_id} is already {current.status}","messagePattern":"Job (.+?) is already (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/auto_router_endpoints.py","lineNumber":814,"sourceCode":")\nasync def stop_shadow_eval_job(\n    job_id: str,\n    user_api_key_dict: Annotated[UserAPIKeyAuth, Depends(user_api_key_auth)],\n) -> ShadowEvalJobResponse:\n    \"\"\"Stop an active shadow eval job. Attempts are kept; sampling halts within ~10s.\"\"\"\n    from litellm.proxy.proxy_server import prisma_client\n\n    _require_admin_writer(user_api_key_dict, \"stop a shadow eval\")\n    if prisma_client is None:\n        raise HTTPException(status_code=500, detail=CommonProxyErrors.db_not_connected_error.value)\n    record: Final = await prisma_client.db.litellm_shadowevaljob.find_unique(\n        where={\"id\": job_id}  # mutable-ok: Prisma filter\n    )\n    if record is None:\n        raise HTTPException(status_code=404, detail=f\"No shadow eval job {job_id}\")\n    current: Final = ShadowEvalJobResponse.model_validate(record, from_attributes=True)\n    if current.status != \"running\":\n        raise HTTPException(status_code=400, detail=f\"Job {job_id} is already {current.status}\")\n    updated: Final = await prisma_client.db.litellm_shadowevaljob.update(\n        where={\"id\": job_id},  # mutable-ok: Prisma filter\n        data={\"stopped_at\": datetime.now(timezone.utc)},  # mutable-ok: Prisma payload\n    )\n    labeled: Final = await _with_key_labels(\n        prisma_client, (ShadowEvalJobResponse.model_validate(updated, from_attributes=True),)\n    )\n    return labeled[0]\n","sourceCodeStart":796,"sourceCodeEnd":823,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/auto_router_endpoints.py#L796-L823","documentation":"Error \"Job {job_id} is already {current.status}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/auto_router_endpoints.py:814 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the job's current status; no action is needed since it already has the target status.","Wait for a status transition before issuing the same command again."],"exampleFix":null,"handlingStrategy":null,"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"}