Tool Calling: stringify errors instead of silently failing

42f8b86b11847e58ea9235f9f3d3221ef2b9f037

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -2Ignore whitespace
public/scripts/tool-calling.js+2 -2
@@ -292,10 +292,10 @@ export class ToolManager {
292292
293 if (error instanceof Error) {293 if (error instanceof Error) {
294 error.cause = name;294 error.cause = name;
295 return error;295 return error.toString();
296 }296 }
297297
298 return new Error('Unknown error occurred while invoking the tool.', { cause: name });298 return new Error('Unknown error occurred while invoking the tool.', { cause: name }).toString();
299 }299 }
300 }300 }
301301