Repository navigation
Commit 4e01a91
authored
fix(errors): align error mappings with A2A spec (a2aproject#1055)
# Description
Aligns A2A error mappings with the canonical mapping in [A2A
spec](https://a2a-protocol.org/latest/specification/#54-error-code-mappings).
# Changes
- `grpc_handler.py` _ERROR_CODE_MAP: PushNotificationNotSupportedError,
UnsupportedOperationError, VersionNotSupportedError →
FAILED_PRECONDITION (was UNIMPLEMENTED).
- `errors.py` A2A_REST_ERROR_MAPPING: same three errors' gRPC status
updated to FAILED_PRECONDITION; TaskNotCancelableError HTTP 409 → 400;
InvalidAgentResponseError HTTP 502 → 500.
- `test_grpc_handler.py`: updated parametrized expectations for the two
affected gRPC test cases.
Issue a2aproject#1027 🦕1 parent 94ad594 commit 4e01a91
3 files changed
Lines changed: 11 additions & 11 deletions
File tree
- src/a2a
- server/request_handlers
- utils
- tests/server/request_handlers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
0 commit comments