{"record":{"id":"4f7e141a19d8b33b","repo":"BerriAI/litellm","slug":"gigachat-authentication-failed-e-response-text","errorCode":null,"errorMessage":"GigaChat authentication failed: {e.response.text}","messagePattern":"GigaChat authentication failed: (.+?)","errorType":"exception","errorClass":"GigaChatAuthError","httpStatus":null,"severity":"error","filePath":"litellm/llms/gigachat/authenticator.py","lineNumber":174,"sourceCode":"    Returns:\n        Tuple of (access_token, expires_at_ms)\n    \"\"\"\n    headers: Final = {\n        \"Authorization\": f\"Basic {credentials}\",\n        \"RqUID\": str(uuid.uuid4()),\n        \"Content-Type\": \"application/x-www-form-urlencoded\",\n    }\n    data: Final = {\"scope\": scope}\n\n    verbose_logger.debug(\"Requesting GigaChat access token from %s\", auth_url)\n\n    try:\n        client: Final = _get_http_client()\n        response: Final = client.post(auth_url, headers=headers, data=data, timeout=30)\n        response.raise_for_status()\n        return _parse_token_response(response)\n    except httpx.HTTPStatusError as e:\n        raise GigaChatAuthError(\n            status_code=e.response.status_code,\n            message=f\"GigaChat authentication failed: {e.response.text}\",\n        )\n    except httpx.RequestError as e:\n        raise GigaChatAuthError(\n            status_code=500,\n            message=f\"GigaChat authentication request failed: {e}\",\n        )\n\n\nasync def _request_token_async(\n    credentials: str,\n    scope: str,\n    auth_url: str,\n) -> tuple[str, int]:\n    \"\"\"Async version of _request_token_sync.\"\"\"\n    headers: Final = {\n        \"Authorization\": f\"Basic {credentials}\",","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/gigachat/authenticator.py#L156-L192","documentation":"Error \"GigaChat authentication failed: {e.response.text}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/gigachat/authenticator.py:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the GigaChat credentials; see the API error text."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}