From 1dbdb0dbdd6e811a2de346958e0e8cecd01af51d Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Wed, 25 Feb 2026 10:41:21 -0800 Subject: [PATCH] Update litellm/proxy/guardrails/guardrail_hooks/block_code_execution/block_code_execution.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .../block_code_execution/block_code_execution.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/proxy/guardrails/guardrail_hooks/block_code_execution/block_code_execution.py b/litellm/proxy/guardrails/guardrail_hooks/block_code_execution/block_code_execution.py index 3a373b5677a..f5e7c2b379a 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/block_code_execution/block_code_execution.py +++ b/litellm/proxy/guardrails/guardrail_hooks/block_code_execution/block_code_execution.py @@ -317,6 +317,9 @@ class BlockCodeExecutionGuardrail(CustomGuardrail): except HTTPException: status = "guardrail_intervened" raise + except ModifyResponseException: + status = "guardrail_intervened" + raise except Exception as e: status = "guardrail_failed_to_respond" exception_str = str(e)