mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-01 11:56:48 +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) {
|
if (error instanceof Error) {
|
||||||
error.cause = name;
|
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…
x
Reference in New Issue
Block a user