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)