-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Labels
compatibilityIssue related to A2A compatibilityIssue related to A2A compatibilityhttp+jsonIssue related to the HTTP+JSON transportIssue related to the HTTP+JSON transport
Milestone
Description
What happened?
Summary
When SendMessage is called on a task in terminal state via the HTTP+JSON transport, the SUT returns HTTP 501 instead of the spec-mandated HTTP 400.
Requirement
- ID: CORE-SEND-002
- Section: 3.1.1 / 5.4 — SendMessage / Error Code Mappings
- Level: MUST
- Spec: https://github.com/a2aproject/A2A/blob/173695755607e884aa9acf8ce4feed90e32727a1/docs/specification.md#54-error-code-mappings
Specification
All A2A-specific errors defined in Section 3.3.2 MUST be mapped to binding-specific error representations.
| A2A Error Type | HTTP Status |
|---|---|
UnsupportedOperationError |
400 Bad Request |
Expected behavior
HTTP+JSON should return 400 Bad Request for UnsupportedOperationError.
Actual behavior
HTTP+JSON returns 501 Not Implemented with body:
{"title":"Cannot send message to task ...","status":501,"type":"https://a2a-protocol.org/errors/unsupported-operation"}Reproducer
# Step 1: Create a completed task
TASK_ID=$(curl -s -X POST http://localhost:9999/message:send \
-H 'Content-Type: application/json' \
-d '{"message":{"messageId":"tck-complete-task-repro","role":"ROLE_USER","parts":[{"text":"Hello"}]}}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['task']['id'])")
# Step 2: Send to the completed task
# Expected: HTTP 400
# Actual: HTTP 501
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" \
-X POST http://localhost:9999/message:send \
-H 'Content-Type: application/json' \
-d "{\"message\":{\"messageId\":\"followup\",\"taskId\":\"$TASK_ID\",\"role\":\"ROLE_USER\",\"parts\":[{\"text\":\"Follow-up\"}]}}"TCK test
tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-SEND-002-http_json]
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
compatibilityIssue related to A2A compatibilityIssue related to A2A compatibilityhttp+jsonIssue related to the HTTP+JSON transportIssue related to the HTTP+JSON transport