{"record":{"id":"000d332a380fca93","repo":"BerriAI/litellm","slug":"authentication-error-e-000d33","errorCode":null,"errorMessage":"Authentication Error, {e}","messagePattern":"Authentication Error, (.+?)","errorType":"exception","errorClass":"ProxyException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/management_endpoints/organization_endpoints.py","lineNumber":1266,"sourceCode":"            updated_organization_memberships.append(updated_organization_membership)\n\n        return OrganizationAddMemberResponse(\n            organization_id=data.organization_id,\n            updated_users=updated_users,\n            updated_organization_memberships=updated_organization_memberships,\n        )\n    except Exception as e:\n        verbose_proxy_logger.exception(\"Error adding member to organization: %s\", e)\n        if isinstance(e, HTTPException):\n            raise ProxyException(\n                message=getattr(e, \"detail\", f\"Authentication Error({e})\"),\n                type=ProxyErrorTypes.auth_error,\n                param=getattr(e, \"param\", \"None\"),\n                code=getattr(e, \"status_code\", 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.auth_error,\n            param=getattr(e, \"param\", \"None\"),\n            code=status.HTTP_500_INTERNAL_SERVER_ERROR,\n        )\n\n\nasync def find_member_if_email(user_email: str, prisma_client: PrismaClient) -> LiteLLM_UserTable:\n    \"\"\"\n    Find a member if the user_email is in LiteLLM_UserTable\n    \"\"\"\n\n    try:\n        existing_user_email_row: Final[BaseModel] = await UserRepository(prisma_client).table.find_unique(\n            where={\"user_email\": user_email}\n        )\n    except Exception:\n        raise HTTPException(","sourceCodeStart":1248,"sourceCodeEnd":1284,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/organization_endpoints.py#L1248-L1284","documentation":"The generic except-branch of /organization/add_member: a non-HTTPException failure (DB error, prisma failure, unexpected bug) is logged and re-raised as a ProxyException tagged auth_error with HTTP 500. It tells the client the member-add transaction failed server-side without leaking internals beyond str(e).","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:1266 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the API key/credentials used for the request.","Check proxy server logs for the underlying auth error."],"exampleFix":null,"handlingStrategy":"try-catch","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-14T00:17:10.932Z"}