a2a-java icon indicating copy to clipboard operation
a2a-java copied to clipboard

fix: handle blank push notification config id consistently across transports

Open malladinagarjuna2 opened this issue 3 months ago • 2 comments

GetTaskPushNotificationConfigParams rejects a null id but permits an empty string, and the two transports diverge on that input:

  • GrpcTransport sends .setId("").
  • RestTransport treats it as absent and requests the trailing-slash "default config" URL.

Identical caller code against the same ClientTransport method therefore produces two different requests. This aligns both on and adds coverage for the blank-id path, which was previously untested.

Also corrects the Javadoc on GetTaskPushNotificationConfigParams, which described id as optional and documented @throws for taskId or tenant when the constructor actually validates taskId and id.

malladinagarjuna2 avatar Aug 05 '26 17:08 malladinagarjuna2

Hi! I'm a second-year B.Tech CSE student and would like to make my first contribution to this project. I noticed that blank push notification config IDs are handled differently by the REST and gRPC transports. Is this issue still available to work on? I'd like to investigate the behavior, implement a fix, and add tests. Thank you!

prachisinghal-1 avatar Oct 23 '26 12:10 prachisinghal-1

@prachisinghal-1 hi, yes please go ahead. Note we did something in https://github.com/a2aproject/a2a-java/pull/1092 which touches on this, so make sure to take this into account :-)

kabir avatar Oct 23 '26 13:10 kabir