{"record":{"id":"47a77b6d14604896","repo":"BerriAI/litellm","slug":"invalid-expires-value-supported-active-expir","errorCode":null,"errorMessage":"Invalid expires value. Supported: 'active', 'expired'.","messagePattern":"Invalid expires value\\. Supported: 'active', 'expired'\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/key_management_endpoints.py","lineNumber":5506,"sourceCode":"    \"\"\"\n    try:\n        from litellm.proxy.proxy_server import prisma_client\n\n        verbose_proxy_logger.debug(\"Entering list_keys function\")\n\n        if prisma_client is None:\n            verbose_proxy_logger.error(\"Database not connected\")\n            raise Exception(\"Database not connected\")\n\n        # Validate status parameter\n        if status is not None and status != \"deleted\":\n            raise HTTPException(\n                status_code=400,\n                detail={\"error\": \"Invalid status value. Currently only 'deleted' is supported.\"},\n            )\n\n        if isinstance(expires, str) and expires not in VALID_EXPIRES_FILTER_VALUES:\n            raise HTTPException(\n                status_code=400,\n                detail={\"error\": \"Invalid expires value. Supported: 'active', 'expired'.\"},\n            )\n\n        complete_user_info: Final = await validate_key_list_check(\n            user_api_key_dict=user_api_key_dict,\n            user_id=user_id,\n            team_id=team_id,\n            organization_id=organization_id,\n            key_alias=key_alias,\n            key_hash=key_hash,\n            prisma_client=prisma_client,\n        )\n\n        # Fetch team objects once when needed for either admin or member filtering.\n        # This avoids duplicate DB queries for the same team data.\n        if include_team_keys or include_created_by_keys:\n            team_objects = await _fetch_user_team_objects(","sourceCodeStart":5488,"sourceCodeEnd":5524,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/key_management_endpoints.py#L5488-L5524","documentation":"Error \"Invalid expires value. Supported: 'active', 'expired'.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:5506 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use expires='active' or expires='expired', or omit the filter.","Check the endpoint documentation for supported expires values."],"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"}