fix: Use correct HTTP status code for PushNotificationNotSupportedError by kabir · Pull Request #758 · a2aproject/a2a-java · GitHub
Skip to content

fix: Use correct HTTP status code for PushNotificationNotSupportedError - #758

Merged
kabir merged 1 commit into
a2aproject:mainfrom
kabir:issue-748
Mar 18, 2026
Merged

kabir merged 1 commit into
a2aproject:mainfrom
kabir:issue-748

Conversation

@kabir

@kabir kabir commented Mar 17, 2026

Copy link
Copy Markdown
Collaborator

Fixes #748 🦕

@gemini-code-assist

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request changes the HTTP status code for PushNotificationNotSupportedError from 501 (Not Implemented) to 400 (Bad Request). This is a more appropriate mapping, as attempting to use a feature that the agent has explicitly declared as unsupported can be considered a client error. The change is correctly implemented in RestHandler.java, and the corresponding test in RestHandlerTest.java has been updated to reflect the new expected status code. The changes are correct and I have no further suggestions.

@kabir
kabir merged commit c14ec7f into a2aproject:main Mar 18, 2026
11 checks passed
salaboy pushed a commit to salaboy/a2a-java that referenced this pull request Jun 19, 2026
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.

[Bug]: HTTP+JSON transport returns 501 instead of 400 for PushNotificationNotSupportedError

2 participants