a2aproject / a2aproject/A2A

[Bug]: Clarify the Content-Type for errors for the HTTP+JSON transport.

Aperta Adatta ai principianti
#1,685 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
triaged
Lingua principale
Shell
Stelle
25.7k
Fork
2.6k
Merge medio
3g 6h
PR unite (30g)
16

Descrizione

### What happened?

The spec does not specify what is the content-type for errors for the HTTP+JSON transport, `application/json` or `application/problem+json`.

Given that errors now follows https://google.aip.dev/193 instead of RFC 9457, I'd assume that `application/json` is the right content type for error responses

https://github.com/a2aproject/A2A/pull/1600 seems to be the cause of this missing information (the mention of `application/problem+json` was removed in this PR).

Note that there are still 2 error examples with `application/problem+json` in the spec:

* https://github.com/a2aproject/A2A/blob/173695755607e884aa9acf8ce4feed90e32727a1/docs/specification.md#64-version-negotiation-error
* https://github.com/a2aproject/A2A/blob/173695755607e884aa9acf8ce4feed90e32727a1/docs/specification.md#pagination-example

while another error example now uses `application/json`:

* https://github.com/a2aproject/A2A/blob/173695755607e884aa9acf8ce4feed90e32727a1/docs/specification.md#116-error-handling

If there is an agreement, I propose to:

* use `application/son` consistently for JSON-RPC and HTTP+JSON error examples
* Update https://github.com/a2aproject/A2A/blob/173695755607e884aa9acf8ce4feed90e32727a1/docs/specification.md?plain=1#L2212:
> - **Content-Type:** `application/json` for requests and responses (including error responses)

* https://github.com/a2aproject/A2A/blob/173695755607e884aa9acf8ce4feed90e32727a1/docs/specification.md?plain=1#L2729:
> - **Content-Type:** `application/json` for requests and responses (including error responses)

### Relevant log output

```shell

```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

The issue points to specific lines in docs/specification.md where Content-Type headers for error responses need to be updated. Review the linked PR #1600 and the three error examples cited to understand the inconsistency. The task is to change 'application/problem+json' to 'application/json' in the two remaining examples and ensure the specification text at lines 2212 and 2729 correctly states the content type for error responses.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
1/5
Tempo stimato
Meno di un'ora
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
75/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.