[Bug]: gRPC errors do not include google.rpc.ErrorInfo
维护者通常 2 天内回复
评估
调研方向
该 issue 涉及 A2A Java SDK 中的 gRPC 错误处理。检查 gRPC 服务实现以及错误如何转换为状态响应。相关测试位于 tests/compatibility/core_operations/test_error_handling.py 和 tests/compatibility/grpc/test_status_codes.py。首先检查错误映射逻辑,该逻辑可能位于中央错误处理器或 interceptor 中,并确保对于 A2A 特定错误,会将 google.rpc.ErrorInfo 添加到状态详细信息中。通过运行提供的 TCK 测试验证修复。
由索引模型根据 Issue 内容生成。
描述
What happened?
Summary
gRPC errors from the SUT do not include google.rpc.ErrorInfo in the status details, which is required by the A2A specification for all A2A-specific errors.
Requirement
- ID: GRPC-ERR-001
- Section: 10.6 — A2A errors include ErrorInfo in status details
- Level: MUST
- Spec: https://github.com/a2aproject/A2A/blob/0833a5f5fd1b715519c0aecf9e3055e3f9f38089/docs/specification.md#106-error-handling
Specification
For A2A-specific errors, implementations MUST include a
google.rpc.ErrorInfomessage in thestatus.detailsarray with:
reason: The A2A error type in UPPER_SNAKE_CASE without the "Error" suffix (e.g.,TASK_NOT_FOUND)domain: Set to"a2a-protocol.org"metadata: Optional map of additional error context
Expected behavior
When the SUT returns an A2A-specific error (e.g., TaskNotFoundError), the gRPC response should include a google.rpc.Status with a google.rpc.ErrorInfo message in the details array, encoded in the grpc-status-details-bin trailing metadata. The ErrorInfo should have reason set to the error type in UPPER_SNAKE_CASE (e.g., TASK_NOT_FOUND) and domain set to "a2a-protocol.org".
Actual behavior
The SUT returns a plain gRPC NOT_FOUND status with a message string but does not include google.rpc.ErrorInfo in the status details. The grpc-status-details-bin trailing metadata is missing or does not contain an ErrorInfo entry.
Reproducer
# Trigger TaskNotFoundError by requesting a non-existent task
grpcurl -plaintext -d '{"id": "tck-nonexistent-task-001"}' \
localhost:9999 lf.a2a.v1.A2AService/GetTask
# Expected: gRPC NOT_FOUND with google.rpc.ErrorInfo in status.details:
# reason: "TASK_NOT_FOUND"
# domain: "a2a-protocol.org"
#
# Actual: gRPC NOT_FOUND without ErrorInfo in grpc-status-details-bin
TCK test
tests/compatibility/core_operations/test_error_handling.py::TestGrpcErrorStructure::test_grpc_error_for_nonexistent_tasktests/compatibility/grpc/test_status_codes.py::TestGrpcErrorInfo::test_error_info_in_status_details
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要语言
- Java
- 星标
- 507
- 派生
- 192
- 平均合并
- 3 天 8 小时
- 30 天内合并 PR
- 23
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
a2aproject/a2a-java 的其他 Issue
-
fix: handle blank push notification config id consistently across transports可能已有人在做 @prachisinghal-1 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-java#1012 · 2 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
a2aproject/a2a-java#464 · 1 条评论 ·
维护者通常 2 天内回复
-
Create a sample that demonstrates how to use a shared contextId across multiple tasks可能重新可做 @tanish111 于 372 天前认领,目前没有进行中的 PR。 未关闭sample
难度 2/5 1-3 小时 新手友好度 70/100
a2aproject/a2a-java#375 · 5 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Task state transitions are not tracked可能重新可做 @sumitvairagar 于 11 天前认领,目前没有进行中的 PR。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
a2aproject/a2a-java#1222 · 4 条评论 ·
维护者通常 2 天内回复
-
No structured payload logging可能已有人在做 @katepallewarprathmesh-sketch 于 9 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 18/100
a2aproject/a2a-java#1221 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 a2aproject/a2a-java 的全部 Issue
相似的 Issue
-
Component: Frontend Component: Web Component Type: Maintenance
难度 2/5 1-3 小时 新手友好度 76/100
it-at-m/refarch-templates#1944 ·
维护者通常 2 天内回复
-
priority: p2 type: bug
难度 2/5 1-3 小时 新手友好度 68/100
googleapis/java-genai#1372 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 60/100
-
GeoSeries scale and skew tests fail with pytest 9.2.0可能已有人在做 @jiayuasu 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
难度 2/5 1-3 小时 新手友好度 78/100
carlos-emr/carlos#5431 ·
维护者通常 1 天内回复