BerriAI/litellm · error · A2AError
A2A error: {error.get('message', 'Unknown error')}
Error message
A2A error: {error.get('message', 'Unknown error')} What it means
Error "A2A error: {error.get('message', 'Unknown error')}" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/a2a/chat/transformation.py:289
api_key: API key
json_mode: JSON mode flag
Returns:
Populated ModelResponse object
"""
try:
response_json: Final = raw_response.json()
except Exception as e:
raise A2AError(
status_code=raw_response.status_code,
message=f"Failed to parse A2A response: {e}",
headers=dict(raw_response.headers),
)
# Check for JSON-RPC error
if "error" in response_json:
error: Final = response_json["error"]
raise A2AError(
status_code=raw_response.status_code,
message=f"A2A error: {error.get('message', 'Unknown error')}",
headers=dict(raw_response.headers),
)
# Extract text from A2A response
text: Final = extract_text_from_a2a_response(response_json)
# Populate model response
model_response.choices = [
Choices(
finish_reason="stop",
index=0,
message=Message(
content=text,
role="assistant",
),
)View on GitHub (pinned to 6c2dcb801b)
Solutions
- Inspect the A2A error message returned by the agent.
When it happens
Trigger: Thrown at litellm/llms/a2a/chat/transformation.py:289 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/6bb94d8f1ecfbe67.
Report an issue: GitHub.