One error in two JSON bindings
Two columns. Left, a JSON-RPC GetTask for task 00000000 posted to /a2a/jsonrpc gets HTTP 200 OK with an error member: code -32001, message Task not found, and a data array. Right, the same lookup as GET /a2a/rest/tasks/00000000 gets HTTP 404 Not Found with a google.rpc.Status body: code 404, status NOT_FOUND, the same message, and a details array. Lines from data and details lead to one shared box, the google.rpc.ErrorInfo with reason TASK_NOT_FOUND, domain a2a-protocol.org, and the task id in metadata.
A · JSON-RPC
B · HTTP+JSON
POST /a2a/jsonrpc
A2A-Version: 1.0
"jsonrpc": "2.0", "id": 1,
"method": "GetTask",
"params": {"id": "00000000"}
HTTP/1.1 200 OK
Content-Type: application/json
"jsonrpc": "2.0", "id": 1,
"error": {
"code": -32001,
"message": "Task not found",
"data": [
ErrorInfo
]
GET /a2a/rest/tasks/00000000
A2A-Version: 1.0
no body: the id is in the path
HTTP/1.1 404 Not Found
Content-Type: application/a2a+json
"error": {
"code": 404,
"status": "NOT_FOUND",
"message": "Task not found",
"details": [
ErrorInfo
]
data[0]
details[0]
google.rpc.ErrorInfo, the same object in both bindings
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "TASK_NOT_FOUND",
"domain": "a2a-protocol.org",
"metadata": {"taskId": "00000000"}