[Bug]: A2A exceptions lost their structured __repr__ after the client error refactor (#761)
I maintainer di solito rispondono entro 2 giorni
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
What happened?
#683 (for #679) added structured __repr__ methods to the client exception classes. The client error refactor in #761 replaced those classes with the new A2AError-based hierarchy (src/a2a/utils/errors.py, src/a2a/client/errors.py), and the __repr__ methods were not carried over.
Exceptions now fall back to the default Exception.__repr__, which only wraps str() output and loses structured attributes. Since server and client errors share A2AError, this affects both sides:
>>> repr(AgentCardResolutionError('Failed to fetch agent card', status_code=404))
"AgentCardResolutionError('Failed to fetch agent card')" # Loses status_code
>>> repr(InvalidParamsError('Invalid field', data={'field': 'id'}))
"InvalidParamsError('Invalid field')" # Loses data
Suggested fix: add __repr__ to A2AError, so every domain and client error inherits it, and override it in AgentCardResolutionError, following the same pattern as #683:
# A2AError
def __repr__(self) -> str:
return (
f'{self.__class__.__name__}('
f'message={self.message!r}, '
f'data={self.data!r})'
)
# AgentCardResolutionError
def __repr__(self) -> str:
return (
f'{self.__class__.__name__}('
f'status_code={self.status_code!r}, '
f'message={self.message!r})'
)
This does not alter __str__ output, traceback formatting, exception hierarchy or catching behavior.
If dropping __repr__ in #761 was intentional, I may be missing some context. In that case, feel free to close this.
I have a fix ready and I'm opening a PR alongside this issue.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Lingua principale
- Python
- Stelle
- 2.2k
- Fork
- 511
- Merge medio
- 3g 10h
- PR unite (30g)
- 47
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di a2aproject/a2a-python
-
[Bug]: REST task/request id sanitizationForse già presa @Linux2010 l’ha presa 113 giorni fa. Apertamaintainers-only
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
a2aproject/a2a-python#805 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug]: Executor failure right after its Task is enqueued leaves the task SUBMITTED on DatabaseTaskStoreForse già presa @rohityan l’ha presa oggi. Aperta
a2aproject/a2a-python#1351 · 2 assegnatari ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug]: Closing one client from a ClientFactory closes the shared httpx client for every other clientForse già presa @rohityan l’ha presa 2 giorni fa. Aperta
a2aproject/a2a-python#1349 · 2 assegnatari ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug]: `A2A-Version` sent as a request parameter is ignored (spec §3.6.1), so a v1.0 request is treated as 0.3Forse già presa @rohityan l’ha presa 2 giorni fa. Aperta
a2aproject/a2a-python#1344 · 2 assegnatari ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug]: Client transports reject responses with unrecognized fields (spec 5.7)Forse già presa @rohityan l’ha presa 4 giorni fa. Aperta
a2aproject/a2a-python#1341 · 1 commento · 2 assegnatari ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di a2aproject/a2a-python
Issue simili
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoopAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
doronz88/pymobiledevice3#2051 ·
I maintainer di solito rispondono entro 1 giorno
-
Remove DatacircleAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
collabnix/awesome-mcp-lists#230 ·
I maintainer di solito rispondono entro 9 giorni
-
Groc schedules with out of range values pass config validation and fail later when the scheduler is builtForse già presa @auraseb l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
autowarefoundation/autoware_carla_scenario#342 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ianktoo/project-monitor#14 ·