Skip to content

[Feat]: Throw A2AError instead of java.lang exceptions #959

Description

@wushunhao

Is your feature request related to a problem? Please describe.

Hi, when I was using the SDK, I noticed that it shows A2AError in many cases.
But sometimes it shows java.lang Exceptions instead.

For instance, in org.a2aproject.sdk.spec.Message, when it checks the parameters like role/parts, it shows java.lang.IllegalArgumentException instead of the org.a2aproject.sdk.spec.InvalidParamsError.

Describe the solution you'd like

I would like the SDK to throw A2AError when possible, so that I can unify the error handling by catching the A2AError only.

Please tell me what you think. Thanks!

Describe alternatives you've considered

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions