Skip to content

Commit ee10c1f

Browse files
committed
remove PushNotificationConfigNotFoundError
1 parent 89296dd commit ee10c1f

4 files changed

Lines changed: 2 additions & 16 deletions

File tree

src/a2a/server/request_handlers/default_request_handler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
ExtendedAgentCardNotConfiguredError,
5454
InternalError,
5555
InvalidParamsError,
56-
PushNotificationConfigNotFoundError,
5756
PushNotificationNotSupportedError,
5857
TaskNotCancelableError,
5958
TaskNotFoundError,
@@ -579,7 +578,7 @@ async def on_get_task_push_notification_config(
579578
if config.id == config_id:
580579
return config
581580

582-
raise PushNotificationConfigNotFoundError
581+
raise TaskNotFoundError
583582

584583
@validate_request_params
585584
@validate(

src/a2a/types/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
InvalidParamsError,
6161
InvalidRequestError,
6262
MethodNotFoundError,
63-
PushNotificationConfigNotFoundError,
6463
PushNotificationNotSupportedError,
6564
TaskNotCancelableError,
6665
TaskNotFoundError,
@@ -124,7 +123,6 @@
124123
'OpenIdConnectSecurityScheme',
125124
'Part',
126125
'PasswordOAuthFlow',
127-
'PushNotificationConfigNotFoundError',
128126
'PushNotificationNotSupportedError',
129127
'Role',
130128
'SecurityRequirement',

src/a2a/utils/errors.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ class TaskNotCancelableError(A2AError):
4040
message = 'Task cannot be canceled'
4141

4242

43-
class PushNotificationConfigNotFoundError(A2AError):
44-
"""Exception raised when a push notification configuration is not found."""
45-
46-
message = 'Push notification config not found'
47-
48-
4943
class PushNotificationNotSupportedError(A2AError):
5044
"""Exception raised when push notifications are not supported."""
5145

@@ -145,7 +139,6 @@ class VersionNotSupportedError(A2AError):
145139
ExtendedAgentCardNotConfiguredError: -32007,
146140
ExtensionSupportRequiredError: -32008,
147141
VersionNotSupportedError: -32009,
148-
PushNotificationConfigNotFoundError: -32010,
149142
InvalidParamsError: -32602,
150143
InvalidRequestError: -32600,
151144
MethodNotFoundError: -32601,
@@ -158,9 +151,6 @@ class VersionNotSupportedError(A2AError):
158151
TaskNotCancelableError: RestErrorMap(
159152
409, 'FAILED_PRECONDITION', 'TASK_NOT_CANCELABLE'
160153
),
161-
PushNotificationConfigNotFoundError: RestErrorMap(
162-
404, 'NOT_FOUND', 'PUSH_NOTIFICATION_CONFIG_NOT_FOUND'
163-
),
164154
PushNotificationNotSupportedError: RestErrorMap(
165155
400,
166156
'UNIMPLEMENTED',

tests/server/request_handlers/test_default_request_handler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
ExtendedAgentCardNotConfiguredError,
3838
InternalError,
3939
InvalidParamsError,
40-
PushNotificationConfigNotFoundError,
4140
PushNotificationNotSupportedError,
4241
TaskNotCancelableError,
4342
TaskNotFoundError,
@@ -1995,7 +1994,7 @@ async def test_get_task_push_notification_config_info_not_found(agent_card):
19951994
)
19961995

19971996
context = create_server_call_context()
1998-
with pytest.raises(PushNotificationConfigNotFoundError):
1997+
with pytest.raises(TaskNotFoundError):
19991998
await request_handler.on_get_task_push_notification_config(
20001999
params, context
20012000
)

0 commit comments

Comments
 (0)