Skip to content

Commit 9f8f587

Browse files
committed
fix error handling in default request handler
1 parent 396a216 commit 9f8f587

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/a2a/server/request_handlers/default_request_handler_v2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ async def on_create_task_push_notification_config( # noqa: D102
340340
context: ServerCallContext,
341341
) -> TaskPushNotificationConfig:
342342
if not self._push_config_store:
343-
raise UnsupportedOperationError
343+
raise PushNotificationNotSupportedError
344344

345345
task_id = params.task_id
346346
task: Task | None = await self.task_store.get(task_id, context)
@@ -367,7 +367,7 @@ async def on_get_task_push_notification_config( # noqa: D102
367367
context: ServerCallContext,
368368
) -> TaskPushNotificationConfig:
369369
if not self._push_config_store:
370-
raise UnsupportedOperationError
370+
raise PushNotificationNotSupportedError
371371

372372
task_id = params.task_id
373373
config_id = params.id

0 commit comments

Comments
 (0)