a2aproject / a2aproject/A2A

Spec gap: no canonical error for failed push notification config retrieval

Đang mở
#2,126 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Shell
Star
25.7k
Fork
2.6k
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
16

Mô tả

## Summary
`getTaskPushNotificationConfig` / `listTaskPushNotificationConfigs` have no canonical error defined for the case where the requested push notification config (or the task's config list) does not exist.

## Problem
The A2A spec defines error codes for task operations (e.g. `TaskNotFoundError` for a missing task) but nothing equivalent for push notification configs. SDK implementations therefore diverge:

| SDK | Missing push config behavior |
|-----|------------------------------|
| Python | `-32001` (TaskNotFoundError class) / HTTP 404 |
| Java | `TaskNotFoundError` |
| JavaScript | bare internal error → HTTP 500 |
| Go | internal error → HTTP 500 / gRPC Internal |
| Rust | N/A (transport under review) |

A client cannot reliably distinguish "config does not exist" from "server error" across implementations.

## Proposal
Define a canonical error for push-notification-config operations on non-existent configs/tasks, e.g.:
- A spec-level error name and code (or a documented reuse of the task-not-found class for config operations), and
- Consistent HTTP/gRPC status mappings (404 / NOT_FOUND).

## Why it matters
SDKs need a single, spec-conformant mapping to implement; clients need stable error semantics when e.g. polling for a config that was deleted.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.