mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Tool Calling: stringify errors instead of silently failing
This commit is contained in:
parent
ac7135c386
commit
42f8b86b11
@ -292,10 +292,10 @@ export class ToolManager {
|
||||
|
||||
if (error instanceof Error) {
|
||||
error.cause = name;
|
||||
return error;
|
||||
return error.toString();
|
||||
}
|
||||
|
||||
return new Error('Unknown error occurred while invoking the tool.', { cause: name });
|
||||
return new Error('Unknown error occurred while invoking the tool.', { cause: name }).toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user