What happened?
Summary
When push notifications are not supported, the HTTP+JSON transport returns 501 Not Implemented instead of the spec-required 400 Bad Request for PushNotificationNotSupportedError.
Requirement
Specification
The error code mappings table specifies:
| Error Type |
JSON-RPC Code |
gRPC Status |
HTTP Status |
PushNotificationNotSupportedError |
-32003 |
UNIMPLEMENTED |
400 Bad Request |
And Section 3.3.4 (Capability Validation):
If AgentCard.capabilities.pushNotifications is false or not present, operations related to push notification configuration (Create, Get, List, Delete) MUST return PushNotificationNotSupportedError.
Expected behavior
When the agent does not support push notifications, push notification endpoints should return HTTP 400 Bad Request with a PushNotificationNotSupportedError error body.
Actual behavior
The server returns 501 Not Implemented:
{"title":"Push Notification is not supported","details":"","status":501,"type":"https://a2a-protocol.org/errors/push-notification-not-supported"}
The error type is correct (push-notification-not-supported) but the HTTP status code is 501 instead of the spec-required 400.
Reproducer
# Confirm push notifications are not supported
curl -s http://localhost:9999/.well-known/agent-card.json | jq .capabilities.pushNotifications
# false
# Attempt to create a push notification config
curl -s -X POST http://localhost:9999/tasks/foo/pushNotificationConfigs \
-H "Content-Type: application/json" \
-d '{"url":"http://example.com","taskId":"foo"}'
# Returns: 501 Not Implemented
# Expected: 400 Bad Request
TCK test
tests/compatibility/http_json/test_http_status.py::TestHttpJsonStatusCodes::test_push_not_supported_returns_400
Relevant log output
Code of Conduct
What happened?
Summary
When push notifications are not supported, the HTTP+JSON transport returns
501 Not Implementedinstead of the spec-required400 Bad RequestforPushNotificationNotSupportedError.Requirement
Specification
The error code mappings table specifies:
And Section 3.3.4 (Capability Validation):
Expected behavior
When the agent does not support push notifications, push notification endpoints should return HTTP
400 Bad Requestwith aPushNotificationNotSupportedErrorerror body.Actual behavior
The server returns
501 Not Implemented:{"title":"Push Notification is not supported","details":"","status":501,"type":"https://a2a-protocol.org/errors/push-notification-not-supported"}The error type is correct (
push-notification-not-supported) but the HTTP status code is501instead of the spec-required400.Reproducer
TCK test
Relevant log output
Code of Conduct