Skip to content

fix: taskslist error on invalid page token and response serialization#814

Open
guglielmo-san wants to merge 2 commits intoa2aproject:1.0-devfrom
guglielmo-san:guglielmoc/fix_tasks_list
Open

fix: taskslist error on invalid page token and response serialization#814
guglielmo-san wants to merge 2 commits intoa2aproject:1.0-devfrom
guglielmo-san:guglielmoc/fix_tasks_list

Conversation

@guglielmo-san
Copy link
Member

Description

This PR addresses two main issues related to the list_tasks JSON-RPC endpoint:

  • Fixed how list_tasks formats the ListTasksResponse to ensure all fields are explicitly printed, even when they carry default values (such as an empty next_page_token).
  • Replaced generic ValueError exceptions with A2A SDK's standard InvalidParamsError when handling malformed or invalid pagination tokens. This correctly surfaces -32602 Invalid params via JSON-RPC.

…msError` and ensure all fields are printed in JSON RPC list task responses.
@guglielmo-san guglielmo-san requested review from a team and a2a-bot as code owners March 11, 2026 14:14
@guglielmo-san guglielmo-san changed the title fix: a fix: taskslist error on invalid page token and response serialization Mar 11, 2026
@guglielmo-san guglielmo-san changed the base branch from main to 1.0-dev March 11, 2026 14:15
@gemini-code-assist
Copy link
Contributor

Warning

Gemini is experiencing higher than usual traffic and was unable to create the summary. Please try again in a few hours by commenting /gemini summary.

Comment on lines +376 to +380
result = MessageToDict(
response,
preserving_proto_field_name=False,
always_print_fields_with_no_presence=True,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a test asserting the full payload to see exactly what's there?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants