BerriAI/litellm · error · ProxyException

getattr(e, "detail", f"Authentication Error({e})")

Error message

getattr(e, "detail", f"Authentication Error({e})")

What it means

This is the catch-all converter in /organization/add_member: when any HTTPException escapes the member-add flow, it is re-wrapped as a ProxyException whose message is the original detail (falling back to 'Authentication Error(...)' when the exception has no detail attribute). It signals a request-level failure such as missing member, bad org, or access denial, surfaced as 500-class auth_error.

Source

Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:1258

                updated_organization_membership,
            ) = await add_member_to_organization(
                member=member,
                organization_id=data.organization_id,
                prisma_client=prisma_client,
            )

            updated_users.append(updated_user)
            updated_organization_memberships.append(updated_organization_membership)

        return OrganizationAddMemberResponse(
            organization_id=data.organization_id,
            updated_users=updated_users,
            updated_organization_memberships=updated_organization_memberships,
        )
    except Exception as e:
        verbose_proxy_logger.exception("Error adding member to organization: %s", e)
        if isinstance(e, HTTPException):
            raise ProxyException(
                message=getattr(e, "detail", f"Authentication Error({e})"),
                type=ProxyErrorTypes.auth_error,
                param=getattr(e, "param", "None"),
                code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR),
            )
        elif isinstance(e, ProxyException):
            raise e
        raise ProxyException(
            message="Authentication Error, " + str(e),
            type=ProxyErrorTypes.auth_error,
            param=getattr(e, "param", "None"),
            code=status.HTTP_500_INTERNAL_SERVER_ERROR,
        )


async def find_member_if_email(user_email: str, prisma_client: PrismaClient) -> LiteLLM_UserTable:
    """
    Find a member if the user_email is in LiteLLM_UserTable

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the API key/credentials used for the request.
  2. Check proxy server logs for the underlying auth error.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:1258 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/1200c271211ecbc2. Report an issue: GitHub.