File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -999,7 +999,6 @@ class A2AError(
999999 | UnsupportedOperationError
10001000 | ContentTypeNotSupportedError
10011001 | InvalidAgentResponseError
1002- | JSONRPCError
10031002 ]
10041003):
10051004 root : (
@@ -1014,7 +1013,6 @@ class A2AError(
10141013 | UnsupportedOperationError
10151014 | ContentTypeNotSupportedError
10161015 | InvalidAgentResponseError
1017- | JSONRPCError
10181016 )
10191017 """
10201018 A discriminated union of all standard JSON-RPC and A2A-specific error types.
Original file line number Diff line number Diff line change @@ -1487,14 +1487,8 @@ def test_a2a_error_validation_and_serialization() -> None:
14871487 a2a_err_content = A2AError .model_validate (content_type_err_data )
14881488 assert isinstance (a2a_err_content .root , ContentTypeNotSupportedError )
14891489
1490- # 11. Test JSONRPCError
1491- json_rpc_err_instance = JSONRPCError (code = 1234 , message = 'Generic error' )
1492- json_rpc_err_data = json_rpc_err_instance .model_dump (exclude_none = True )
1493- a2a_err_content = A2AError .model_validate (json_rpc_err_data )
1494- assert isinstance (a2a_err_content .root , JSONRPCError )
1495-
1496- # 12. Test invalid data (doesn't match any known error code/structure)
1497- invalid_data : dict [str , Any ] = {'code' : - 99999 , 'messages' : 'Unknown error' }
1490+ # 11. Test invalid data (doesn't match any known error code/structure)
1491+ invalid_data : dict [str , Any ] = {'code' : - 99999 , 'message' : 'Unknown error' }
14981492 with pytest .raises (ValidationError ):
14991493 A2AError .model_validate (invalid_data )
15001494
You can’t perform that action at this time.
0 commit comments