{"record":{"id":"f59e944cea02cb1e","repo":"BerriAI/litellm","slug":"getattr-e-detail-f-error-e","errorCode":null,"errorMessage":"getattr(e, \"detail\", f\"error({e})\")","messagePattern":"getattr\\(e, \"detail\", f\"error\\((.+?)\\)\"\\)","errorType":"http","errorClass":"ProxyException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/management_endpoints/key_management_endpoints.py","lineNumber":5601,"sourceCode":"            sort_by=sort_by,\n            sort_order=sort_order,\n            expand=expand,\n            status=status,\n            project_id=project_id,\n            access_group_id=access_group_id,\n            agent_id=agent_id,\n            use_substring_matching=use_substring_matching,\n            expires_filter=expires if isinstance(expires, str) else None,\n        )\n\n        verbose_proxy_logger.debug(\"Successfully prepared response\")\n\n        return response\n\n    except Exception as e:\n        verbose_proxy_logger.exception(\"Error in list_keys: %s\", e)\n        if isinstance(e, HTTPException):\n            raise ProxyException(\n                message=getattr(e, \"detail\", f\"error({e})\"),\n                type=ProxyErrorTypes.internal_server_error,\n                param=getattr(e, \"param\", \"None\"),\n                code=getattr(e, \"status_code\", fastapi.status.HTTP_500_INTERNAL_SERVER_ERROR),\n            )\n        elif isinstance(e, ProxyException):\n            raise e\n        raise ProxyException(\n            message=\"Authentication Error, \" + str(e),\n            type=ProxyErrorTypes.internal_server_error,\n            param=getattr(e, \"param\", \"None\"),\n            code=fastapi.status.HTTP_500_INTERNAL_SERVER_ERROR,\n        )\n\n\nasync def _apply_non_admin_alias_scope(\n    user_api_key_dict: UserAPIKeyAuth,\n    prisma_client: PrismaClient,","sourceCodeStart":5583,"sourceCodeEnd":5619,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/key_management_endpoints.py#L5583-L5619","documentation":"Error \"getattr(e, \"detail\", f\"error({e})\")\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:5601 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the error detail in the response for the underlying cause and address it.","Check proxy logs for the full error, then retry after fixing the cause."],"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"}