{"record":{"id":"50967ec97a477a24","repo":"BerriAI/litellm","slug":"key-hash-not-found","errorCode":null,"errorMessage":"Key Hash not found.","messagePattern":"Key Hash not found\\.","errorType":"http","errorClass":"ProxyException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/key_management_endpoints.py","lineNumber":5318,"sourceCode":"        if complete_user_info.organization_memberships is None or organization_id not in [\n            membership.organization_id for membership in complete_user_info.organization_memberships\n        ]:\n            raise ProxyException(\n                message=\"You are not authorized to check this organization's keys\",\n                type=ProxyErrorTypes.bad_request_error,\n                param=\"organization_id\",\n                code=status.HTTP_403_FORBIDDEN,\n            )\n\n    if key_hash:\n        try:\n            key_info: Final[LiteLLM_VerificationToken] = await VerificationTokenRepository(\n                prisma_client\n            ).table.find_unique(\n                where={\"token\": key_hash},\n            )\n        except Exception:\n            raise ProxyException(\n                message=\"Key Hash not found.\",\n                type=ProxyErrorTypes.bad_request_error,\n                param=\"key_hash\",\n                code=status.HTTP_403_FORBIDDEN,\n            )\n        can_user_query_key_info: Final = await _can_user_query_key_info(\n            user_api_key_dict=user_api_key_dict,\n            key=key_hash,\n            key_info=key_info,\n        )\n        if not can_user_query_key_info:\n            raise HTTPException(\n                status_code=status.HTTP_403_FORBIDDEN,\n                detail=f\"You are not allowed to access this key's info. Your role={user_api_key_dict.user_role}\",\n            )\n    return complete_user_info\n\n","sourceCodeStart":5300,"sourceCodeEnd":5336,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/key_management_endpoints.py#L5300-L5336","documentation":"Error \"Key Hash not found.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:5318 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the key hash is correct and the key exists via /key/list.","Use the full key value instead of the hash if the endpoint accepts it."],"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"}