{"record":{"id":"1481003b201524e5","repo":"BerriAI/litellm","slug":"litellm-managed-self-resource-type-with-id-unif","errorCode":null,"errorMessage":"LiteLLM Managed {self.resource_type} with id={unified_resource_id} not found","messagePattern":"LiteLLM Managed (.+?) with id=(.+?) not found","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/llms/base_llm/managed_resources/base_managed_resource.py","lineNumber":270,"sourceCode":"        unified_resource_id: str,\n        litellm_parent_otel_span: Span | None = None,\n    ) -> ResourceObjectType | None:\n        \"\"\"\n        Delete unified resource from cache and database.\n\n        Args:\n            unified_resource_id: The unified resource ID to delete\n            litellm_parent_otel_span: OpenTelemetry span for tracing\n\n        Returns:\n            The deleted resource object or None if not found\n        \"\"\"\n        # Get old value from database\n        table: Final = getattr(self.prisma_client.db, self.table_name)\n        initial_value: Final = await table.find_first(where={\"unified_resource_id\": unified_resource_id})\n\n        if initial_value is None:\n            raise Exception(f\"LiteLLM Managed {self.resource_type} with id={unified_resource_id} not found\")\n\n        # Delete from cache\n        await self.internal_usage_cache.async_set_cache(\n            key=unified_resource_id,\n            value=None,\n            litellm_parent_otel_span=litellm_parent_otel_span,\n        )\n\n        # Delete from database\n        await table.delete(where={\"unified_resource_id\": unified_resource_id})\n\n        return initial_value.resource_object\n\n    async def can_user_access_unified_resource_id(\n        self,\n        unified_resource_id: str,\n        user_api_key_dict: UserAPIKeyAuth,\n        litellm_parent_otel_span: Span | None = None,","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/base_llm/managed_resources/base_managed_resource.py#L252-L288","documentation":"Error \"LiteLLM Managed {self.resource_type} with id={unified_resource_id} not found\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/base_llm/managed_resources/base_managed_resource.py:270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the resource id exists: list managed resources of this type and use a valid unified_resource_id.","Ensure the resource was created through the LiteLLM managed resource API and not deleted.","Check for typos in the resource id passed in the request."],"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-23T08:17:48.524Z"}