{"record":{"id":"87b3dabd67288f8d","repo":"BerriAI/litellm","slug":"content-blocked-by-zscaler-ai-guard-self-extract","errorCode":null,"errorMessage":"Content blocked by Zscaler AI Guard: {self.extract_blocking_info(blocking_info)}","messagePattern":"Content blocked by Zscaler AI Guard: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/zscaler_ai_guard.py","lineNumber":229,"sourceCode":"            zscaler_ai_guard_result = None\n            direction: Final = \"OUT\" if input_type == \"response\" else \"IN\"\n            verbose_proxy_logger.debug(\"direction: %s\", direction)\n            # Concatenate all texts and send to Zscaler AI Guard\n            if texts:\n                concatenated_text: Final = \" \".join(texts)\n                zscaler_ai_guard_result = await self.make_zscaler_ai_guard_api_call(\n                    zscaler_ai_guard_url=self.zscaler_ai_guard_url,\n                    api_key=self.api_key,\n                    policy_id=policy_id,\n                    direction=direction,\n                    content=concatenated_text,\n                    **kwargs,\n                )\n                verbose_proxy_logger.debug(\"response from zscaler ai guards: %s\", zscaler_ai_guard_result)\n            if zscaler_ai_guard_result and zscaler_ai_guard_result.get(\"action\") == \"BLOCK\":\n                blocking_info: Final = zscaler_ai_guard_result.get(\"zscaler_ai_guard_response\")\n                error_message = f\"Content blocked by Zscaler AI Guard: {self.extract_blocking_info(blocking_info)}\"\n                raise HTTPException(status_code=400, detail={\"error\": error_message})\n        except HTTPException:\n            raise\n        except Exception as e:\n            verbose_proxy_logger.error(\"ZscalerAIGuard: Failed to apply guardrail: %s\", str(e))\n            raise e\n\n        verbose_proxy_logger.debug(\"ZscalerAIGuard: Successfully applied guardrail.\")\n        return inputs\n\n    def extract_blocking_info(self, response):\n        \"\"\"\n        Extracts transaction ID and blocking detector details from a response.\n        \"\"\"\n        transaction_id: Final = response.get(\"transactionId\", None)\n\n        # Find which detectors are invoked and blocking\n        blocking_detectors: Final = []\n        detector_responses: Final = response.get(\"detectorResponses\", {})","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/zscaler_ai_guard.py#L211-L247","documentation":"Error \"Content blocked by Zscaler AI Guard: {self.extract_blocking_info(blocking_info)}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/zscaler_ai_guard.py:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Review the blocking info from Zscaler AI Guard and modify the request content.","Adjust the Zscaler AI Guard policy if the block is unintended."],"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"}