fix: UnsupportedOperationError gRPC status should be FAILED_PRECONDITION per spec · Issue #1051 · a2aproject/a2a-java · GitHub
Skip to content

fix: UnsupportedOperationError gRPC status should be FAILED_PRECONDITION per spec #1051

Closed

Description

@kabir

Problem

The A2A specification (section 5.4) defines the following gRPC status mapping for UnsupportedOperationError:

A2A Error Type JSON-RPC Code gRPC Status HTTP Status
UnsupportedOperationError -32004 FAILED_PRECONDITION 400 Bad Request

However, A2AErrorCodes.UNSUPPORTED_OPERATION in the SDK maps to UNIMPLEMENTED:

UNSUPPORTED_OPERATION(-32004, "UNIMPLEMENTED", 400),

This diverges from the spec table, which says the gRPC status should be FAILED_PRECONDITION.

Expected behavior

UNSUPPORTED_OPERATION should map to gRPC FAILED_PRECONDITION to match the spec.

Context

Found during review of #1041, which correctly changed streaming-not-supported errors from InvalidRequestError to UnsupportedOperationError. The gRPC status mismatch is a pre-existing issue unrelated to that PR.

Activity

  1. dangzitou commented on Aug 12, 2026

    @dangzitou

    I reproduced this on current main (643f1f80). I updated only the existing gRPC assertions for paths that emit UnsupportedOperationError and ran:

    mvn -pl transport/grpc -am -Dtest=GrpcHandlerTest -Dsurefire.failIfNoSpecifiedTests=false test

    All 8 affected paths failed consistently with expected: <FAILED_PRECONDITION> but was: <UNIMPLEMENTED> (42 tests total, 34 unaffected tests passed). I am working on the minimal mapping/test/doc update.

  2. added 2 commits that reference this issue on Aug 13, 2026
    d87ca59
    a21cd23
  3. kabir commented on Aug 19, 2026

    @kabir
    CollaboratorAuthor

    Closing as per #1059 (comment)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions