{"record":{"id":"6bb94d8f1ecfbe67","repo":"BerriAI/litellm","slug":"a2a-error-error-get-message-unknown-error","errorCode":null,"errorMessage":"A2A error: {error.get('message', 'Unknown error')}","messagePattern":"A2A error: (.+?)","errorType":"exception","errorClass":"A2AError","httpStatus":null,"severity":"error","filePath":"litellm/llms/a2a/chat/transformation.py","lineNumber":289,"sourceCode":"            api_key: API key\n            json_mode: JSON mode flag\n\n        Returns:\n            Populated ModelResponse object\n        \"\"\"\n        try:\n            response_json: Final = raw_response.json()\n        except Exception as e:\n            raise A2AError(\n                status_code=raw_response.status_code,\n                message=f\"Failed to parse A2A response: {e}\",\n                headers=dict(raw_response.headers),\n            )\n\n        # Check for JSON-RPC error\n        if \"error\" in response_json:\n            error: Final = response_json[\"error\"]\n            raise A2AError(\n                status_code=raw_response.status_code,\n                message=f\"A2A error: {error.get('message', 'Unknown error')}\",\n                headers=dict(raw_response.headers),\n            )\n\n        # Extract text from A2A response\n        text: Final = extract_text_from_a2a_response(response_json)\n\n        # Populate model response\n        model_response.choices = [\n            Choices(\n                finish_reason=\"stop\",\n                index=0,\n                message=Message(\n                    content=text,\n                    role=\"assistant\",\n                ),\n            )","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/a2a/chat/transformation.py#L271-L307","documentation":"A2A JSON-RPC error branch: the agent's response contains an 'error' object, so the call failed at the protocol level; the error's message is raised as A2AError, surfacing the agent-side failure to the caller.","triggerScenarios":"Thrown at litellm/llms/a2a/chat/transformation.py:289 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the A2A error message returned by the agent and fix the request accordingly.","Check the A2A agent's availability and task configuration."],"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-23T08:17:48.524Z"}