{"record":{"id":"6203697fcf5f00e5","repo":"BerriAI/litellm","slug":"the-proxy-rejected-the-login-session-with-http-re","errorCode":null,"errorMessage":"The proxy rejected the login session with HTTP {response.status_code}","messagePattern":"The proxy rejected the login session with HTTP (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/client/cli/commands/auth.py","lineNumber":384,"sourceCode":"    for attempt in range(total_timeout // poll_interval):\n        try:\n            request_kwargs: CliPollRequestKwargs = {\"timeout\": request_timeout}\n            if headers is not None:\n                request_kwargs[\"headers\"] = headers\n            response = requests.get(url, **request_kwargs)\n            if response.status_code == 200:\n                data: CliPollData = response.json()\n                status = data.get(\"status\")\n                if status == \"ready\":\n                    return data\n                if status == \"pending\":\n                    if pending_message and pending_log_every > 0 and attempt % pending_log_every == 0:\n                        click.echo(pending_message)\n                elif other_status_message and other_status_log_every > 0 and attempt % other_status_log_every == 0:\n                    click.echo(other_status_message)\n            elif _is_permanent_polling_error(response.status_code):\n                detail = _response_error_detail(response)\n                raise ValueError(\n                    f\"The proxy rejected the login session with HTTP {response.status_code}\"\n                    + (f\": {detail}\" if detail else f\" and no error detail (from {url})\")\n                )\n            elif http_error_log_every > 0 and attempt % http_error_log_every == 0:\n                click.echo(_polling_error_message(response))\n        except requests.RequestException as e:\n            if connection_error_log_every > 0 and attempt % connection_error_log_every == 0:\n                click.echo(f\"Connection error (will retry): {e}\")\n        time.sleep(poll_interval)\n    return None\n\n\ndef _normalize_teams(teams: object, team_details: object) -> list[CliTeam]:\n    \"\"\"If team_details are a\n\n    Args:\n        teams (_type_): _description_\n        team_details (_type_): _description_","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/client/cli/commands/auth.py#L366-L402","documentation":"The CLI SSO poll loop received a non-200 from the polling endpoint, meaning the login session was rejected server-side (expired, revoked, or mismatched). Surfaced as ValueError to abort the login flow.","triggerScenarios":"Thrown at litellm/proxy/client/cli/commands/auth.py:384 when the library encounters an invalid state.","commonSituations":"The proxy rejected the CLI login session (expired or invalid session).","solutions":["Retry `lite login`; the session may have expired.","Check the proxy logs for why the login session was rejected."],"exampleFix":"lite login --base-url http://localhost:4000","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-14T05:17:10.506Z"}