{"record":{"id":"fb40bee3ee56c445","repo":"BerriAI/litellm","slug":"blocked-by-xecguard-policies-policies-trace-i","errorCode":null,"errorMessage":"Blocked by XecGuard: policies=[{policies}] trace_id={trace_id} rationale={rationale}","messagePattern":"Blocked by XecGuard: policies=\\[(.+?)\\] trace_id=(.+?) rationale=(.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_hooks/xecguard/xecguard.py","lineNumber":168,"sourceCode":"        request_data: dict,\n        input_type: Literal[\"request\", \"response\"],\n        logging_obj: Optional[\"LiteLLMLoggingObj\"] = None,\n    ) -> GenericGuardrailAPIInputs:\n        messages: Final = self._build_full_history(\n            request_data=request_data,\n            inputs=inputs,\n            input_type=input_type,\n        )\n        if not messages:\n            return inputs\n\n        scan_type: Final = \"input\" if input_type == \"request\" else \"response\"\n        scan_result: Final = await self._call_scan(messages=messages, scan_type=scan_type)\n        if scan_result is None:\n            return inputs\n\n        if scan_result.get(\"decision\") == \"UNSAFE\":\n            raise HTTPException(\n                status_code=400,\n                detail={\n                    \"error\": self._format_scan_block_message(scan_result),\n                    \"guardrail_name\": self.guardrail_name or \"xecguard\",\n                    \"xecguard_response\": scan_result,\n                },\n            )\n\n        if input_type == \"response\":\n            documents: Final = self._extract_grounding_documents(request_data)\n            if documents:\n                grounding_result: Final = await self._call_grounding(\n                    messages=messages,\n                    documents=documents,\n                )\n                if grounding_result is not None and grounding_result.get(\"decision\") == \"UNSAFE\":\n                    raise HTTPException(\n                        status_code=400,","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_hooks/xecguard/xecguard.py#L150-L186","documentation":"Error \"Blocked by XecGuard: policies=[{policies}] trace_id={trace_id} rationale={rationale}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/guardrails/guardrail_hooks/xecguard/xecguard.py:168 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Review the listed policies and rationale, then modify the request content.","Use the trace_id to look up the decision in XecGuard for details."],"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-14T00:17:10.932Z"}