mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
fix(guardrail_endpoints): use correct PK field in rollback delete and log rollback failure
This commit is contained in:
parent
da130d2e8e
commit
2b4a1c4f46
1 changed files with 5 additions and 3 deletions
|
|
@ -347,10 +347,12 @@ async def create_guardrail(
|
|||
if prisma_client is not None:
|
||||
try:
|
||||
await prisma_client.db.litellm_guardrailstable.delete(
|
||||
where={"id": guardrail_id}
|
||||
where={"guardrail_id": guardrail_id}
|
||||
)
|
||||
except Exception as rollback_err:
|
||||
verbose_proxy_logger.warning(
|
||||
f"Rollback failed for guardrail '{guardrail_id}': {rollback_err}"
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail=f"Guardrail configuration error: {init_error}",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue