Skip to content

Commit 86782e9

Browse files
authored
Bugfix/throw error on agent tool call error (#4464)
throw error on agent tool call error
1 parent 6cf1c82 commit 86782e9

File tree

1 file changed

+4
-0
lines changed
  • packages/components/nodes/agentflow/Agent

1 file changed

+4
-0
lines changed

packages/components/nodes/agentflow/Agent/Agent.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,6 +1442,8 @@ class Agent_Agentflow implements INode {
14421442
toolOutput: '',
14431443
error: getErrorMessage(e)
14441444
})
1445+
sseStreamer?.streamUsedToolsEvent(chatId, flatten(usedTools))
1446+
throw new Error(getErrorMessage(e))
14451447
}
14461448
}
14471449
}
@@ -1678,6 +1680,8 @@ class Agent_Agentflow implements INode {
16781680
toolOutput: '',
16791681
error: getErrorMessage(e)
16801682
})
1683+
sseStreamer?.streamUsedToolsEvent(chatId, flatten(usedTools))
1684+
throw new Error(getErrorMessage(e))
16811685
}
16821686
}
16831687
}

0 commit comments

Comments
 (0)