Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: gRPC errors do not include google.rpc.ErrorInfo

未关闭
#731 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 2 天内回复

@kabir 已经在做这个了。

开始于 2026年3月12日。

  • #738 来自 @kabir —— 已关闭,未合并

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
grpc
领域
api, backend

调研方向

该 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 内容生成。

描述

compatibility gRPC
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

Specification

For A2A-specific errors, implementations MUST include a google.rpc.ErrorInfo message in the status.details array 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_task
  • tests/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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

a2aproject/a2a-java 的其他 Issue

查看 a2aproject/a2a-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。