{"record":{"id":"e58bb22449d3588e","repo":"BerriAI/litellm","slug":"failed-to-parse-a2a-response-e","errorCode":null,"errorMessage":"Failed to parse A2A response: {e}","messagePattern":"Failed to parse A2A response: (.+?)","errorType":"http","errorClass":"A2AError","httpStatus":null,"severity":"error","filePath":"litellm/llms/a2a/chat/transformation.py","lineNumber":280,"sourceCode":"            model: Model name\n            raw_response: HTTP response from A2A agent\n            model_response: Model response object to populate\n            logging_obj: Logging object\n            request_data: Original request data\n            messages: Original messages\n            optional_params: Optional parameters\n            litellm_params: LiteLLM parameters\n            encoding: Encoding object\n            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","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/a2a/chat/transformation.py#L262-L298","documentation":"Error \"Failed to parse A2A response: {e}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/a2a/chat/transformation.py:280 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the agent's response format; see the wrapped parse exception."],"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"}