mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Updates error handling in case of incorrect tool calling. (#2304)
This commit is contained in:
@@ -110,10 +110,15 @@ export async function runNonInteractive(
|
||||
);
|
||||
|
||||
if (toolResponse.error) {
|
||||
const isToolNotFound = toolResponse.error.message.includes(
|
||||
'not found in registry',
|
||||
);
|
||||
console.error(
|
||||
`Error executing tool ${fc.name}: ${toolResponse.resultDisplay || toolResponse.error.message}`,
|
||||
);
|
||||
process.exit(1);
|
||||
if (!isToolNotFound) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (toolResponse.responseParts) {
|
||||
|
||||
Reference in New Issue
Block a user