[Bug]: gRPC errors do not include google.rpc.ErrorInfo · Issue #731 · a2aproject/a2a-java · GitHub
Skip to content

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

Open

Description

@jmesnil

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

Activity

  1. added this to the 1.0.0 milestone on Mar 12, 2026
  2. added theissue type on Mar 12, 2026
  3. added
    gRPCIssue related to the gRPC transport
    on Mar 12, 2026
  4. self-assigned this
    on Mar 12, 2026
  5. added a commit that references this issue on Mar 12, 2026
    0fe881e
  6. serhiy-bzhezytskyy commented on Sep 16, 2026

    @serhiy-bzhezytskyy
    Contributor

    This looks fixed by #743 (2026-03-25) — GrpcHandler.handleError() already builds google.rpc.ErrorInfo{reason: errorCode.name(), domain: "a2a-protocol.org"} and packs it into status.details. Ran GrpcHandlerTest#testOnGetTaskNotFound on current main: ErrorInfo is present with domain=a2a-protocol.org and reason=TASK_NOT_FOUND (verified the exact value, not just non-empty). Can this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

compatibilityIssue related to A2A compatibilitygRPCIssue related to the gRPC transport

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions