{"record":{"id":"285b024b4a7a9cff","repo":"BerriAI/litellm","slug":"error-in-pangea-guardrail","errorCode":null,"errorMessage":"Error in Pangea Guardrail","messagePattern":"Error in Pangea Guardrail","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_hooks/pangea/pangea.py","lineNumber":210,"sourceCode":"        self,\n        user_api_key_dict: UserAPIKeyAuth,\n        cache: DualCache,\n        data: dict,\n        call_type: str,\n    ):\n        event_type: Final = GuardrailEventHooks.pre_call\n        if self.should_run_guardrail(data=data, event_type=event_type) is not True:\n            verbose_proxy_logger.debug(\n                \"Pangea Guardrail (async_pre_call_hook): Guardrail is disabled %s.\", self.guardrail_name\n            )\n            return data\n\n        try:\n            return await self._async_pre_call_hook(user_api_key_dict, cache, data, call_type)\n        except HTTPException:\n            raise\n        except Exception as e:\n            raise HTTPException(\n                status_code=500,\n                detail={\n                    \"error\": \"Error in Pangea Guardrail\",\n                    \"guardrail_name\": self.guardrail_name,\n                    \"exceptions\": str(e),\n                },\n            ) from e\n\n    async def _async_post_call_success_hook(\n        self,\n        data: dict,\n        user_api_key_dict: UserAPIKeyAuth,\n        # This union isn't actually correct -- it can get other response types depending on the API called\n        response: LLMResponseTypes,\n    ):\n        if isinstance(response, TextCompletionResponse):\n            # Assume the earlier call type as well\n            input_messages = _TextCompletionRequest(data).get_messages()","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_hooks/pangea/pangea.py#L192-L228","documentation":"Error \"Error in Pangea Guardrail\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/guardrails/guardrail_hooks/pangea/pangea.py:210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the proxy logs for the underlying Pangea API error.","Verify PANGEA_API_KEY and the Pangea service configuration are correct.","Confirm network connectivity to the Pangea API endpoint."],"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"}