diff options
| author | Vachan <[email protected]> | 2025-06-27 16:57:40 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-27 23:57:40 +0000 |
| commit | db115c468a894e7bf203e18577f1b698e939aef0 (patch) | |
| tree | 2c102015312e2eb07d955ddc41ed55059e3abd18 /packages/cli/src/nonInteractiveCli.ts | |
| parent | 150df382f8e0b84aa6028622480c28186c99b8a7 (diff) | |
Updates error handling in case of incorrect tool calling. (#2304)
Diffstat (limited to 'packages/cli/src/nonInteractiveCli.ts')
| -rw-r--r-- | packages/cli/src/nonInteractiveCli.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/cli/src/nonInteractiveCli.ts b/packages/cli/src/nonInteractiveCli.ts index 95a9c51c..64a87162 100644 --- a/packages/cli/src/nonInteractiveCli.ts +++ b/packages/cli/src/nonInteractiveCli.ts @@ -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) { |
