{"record":{"id":"15bf26deb5b92d40","repo":"BerriAI/litellm","slug":"xecguard-api-unreachable-block-on-error-true-e","errorCode":null,"errorMessage":"XecGuard API unreachable (block_on_error=True): {exc}","messagePattern":"XecGuard API unreachable \\(block_on_error=True\\): (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_hooks/xecguard/xecguard.py","lineNumber":372,"sourceCode":"        )\n        try:\n            response: Final = await self.async_handler.post(\n                url=endpoint,\n                headers={\n                    \"Authorization\": f\"Bearer {self.api_key}\",\n                    \"Content-Type\": \"application/json\",\n                },\n                json=payload,\n                timeout=10.0,\n            )\n            response.raise_for_status()\n            return response.json()\n        except Exception as exc:\n            verbose_proxy_logger.error(\"XecGuard API error: %s\", str(exc))\n            if suppress_errors:\n                return None\n            if self.block_on_error:\n                raise HTTPException(\n                    status_code=400,\n                    detail={\n                        \"error\": (f\"XecGuard API unreachable (block_on_error=True): {exc}\"),\n                        \"guardrail_name\": self.guardrail_name or \"xecguard\",\n                    },\n                ) from exc\n            return None\n\n    # ------------------------------------------------------------------\n    # Message-assembly helpers (respect the full-history requirement)\n    # ------------------------------------------------------------------\n\n    def _build_full_history(\n        self,\n        request_data: dict,\n        inputs: Any,\n        input_type: str,\n    ) -> list[dict]:","sourceCodeStart":354,"sourceCodeEnd":390,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_hooks/xecguard/xecguard.py#L354-L390","documentation":"Error \"XecGuard API unreachable (block_on_error=True): {exc}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/guardrails/guardrail_hooks/xecguard/xecguard.py:372 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify network connectivity to the XecGuard API.","Set block_on_error=False if requests should proceed during XecGuard outages."],"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"}