File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/a2a_dart/lib/src/client Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -54,16 +54,15 @@ class SseTransport extends HttpTransport {
5454 yield jsonData['result' ] as Map <String , dynamic >;
5555 } else if (jsonData.containsKey ('error' )) {
5656 final error = jsonData['error' ] as Map <String , dynamic >;
57- yield * Stream . error ( A2AException .jsonRpc (
57+ throw A2AException .jsonRpc (
5858 code: error['code' ] as int ,
5959 message: error['message' ] as String ,
6060 data: error['data' ] as Map <String , dynamic >? ,
61- )) ;
61+ );
6262 }
6363 } catch (e) {
64- yield * Stream . error ( A2AException .parsing (message: e.toString () ));
64+ throw A2AException .parsing (message: e.toString ());
6565 }
66- }
6766 } else if (line.startsWith ('data:' )) {
6867 data.add (line.substring (5 ).trim ());
6968 } else if (line.startsWith (':' )) {
You can’t perform that action at this time.
0 commit comments