{"record":{"id":"5e35b4c2641d2f90","repo":"BerriAI/litellm","slug":"no-keys-found","errorCode":null,"errorMessage":"No keys found","messagePattern":"No keys found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/management_endpoints/key_management_endpoints.py","lineNumber":4192,"sourceCode":"            Optional[Dict]:\n                - Number of deleted tokens\n            List[LiteLLM_VerificationToken]:\n                - List of keys being deleted, this contains information about the key_alias, token, and user_id being deleted,\n                this is passed down to the KeyManagementEventHooks to delete the keys from the secret manager and handle audit logs\n    \"\"\"\n    from litellm.proxy.proxy_server import prisma_client\n\n    failed_tokens: list = []\n    try:\n        if prisma_client:\n            hashed_tokens: Final[list[str]] = [_hash_token_if_needed(token=key) for key in tokens]\n            tokens = hashed_tokens\n            _keys_being_deleted: Final[list[LiteLLM_VerificationToken]] = await _prisma_table(\n                VerificationTokenRepository(prisma_client)\n            ).find_many(where={\"token\": {\"in\": hashed_tokens}})\n\n            if len(_keys_being_deleted) == 0:\n                raise HTTPException(\n                    status_code=status.HTTP_404_NOT_FOUND,\n                    detail={\"error\": \"No keys found\"},\n                )\n\n            if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value:\n                authorized_keys = _keys_being_deleted\n            else:\n                authorized_keys = []\n                for key in _keys_being_deleted:\n                    if await can_modify_verification_token(\n                        key_info=key,\n                        user_api_key_cache=user_api_key_cache,\n                        user_api_key_dict=user_api_key_dict,\n                        prisma_client=prisma_client,\n                    ):\n                        authorized_keys.append(key)\n                    else:\n                        raise HTTPException(","sourceCodeStart":4174,"sourceCodeEnd":4210,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/key_management_endpoints.py#L4174-L4210","documentation":"Error \"No keys found\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:4192 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Broaden the filter criteria; verify keys exist via /key/list without filters.","Confirm you are querying the correct database/environment."],"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"}