File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
typescript/src/server_clients Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,4 @@ async def execute_tool(
133133 await asyncio .sleep (delay )
134134 else :
135135 logging .error ("Max retries reached. Failing." )
136- return {
137- "toolUseId" : tool_use_id ,
138- "content" : [{"text" : f"Error executing tool: { str (e )} " }],
139- "status" : "error" ,
140- }
136+ raise Exception (f"Error executing tool: { str (e )} " )
Original file line number Diff line number Diff line change @@ -127,11 +127,7 @@ export abstract class Server {
127127 await new Promise ( ( resolve ) => setTimeout ( resolve , delay * 1000 ) ) ;
128128 } else {
129129 logger . error ( "Max retries reached. Failing." ) ;
130- return {
131- toolUseId : toolUseId ,
132- content : [ { text : `Error executing tool: ${ String ( e ) } ` } ] ,
133- status : "error" ,
134- } ;
130+ throw new Error ( `Error executing tool: ${ String ( e ) } ` ) ;
135131 }
136132 }
137133 }
You can’t perform that action at this time.
0 commit comments