Skip to content

Commit

Permalink
Generic tool error msg "Error occurred" (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishig authored May 28, 2024
1 parent aca6483 commit 128b4c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/server/textGeneration/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,19 @@ async function* callTool(
return { ...toolResult, call } as ToolResult;
} catch (error) {
MetricsServer.getMetrics().tool.toolUseCountError.inc({ tool: call.name });
logger.error(error, `Failed while running tool ${call.name}`);
logger.error(error, `Failed while running tool ${call.name}. ${stringifyError(error)}`);

yield {
type: MessageUpdateType.Tool,
subtype: MessageToolUpdateType.Error,
uuid,
message: stringifyError(error),
message: "Error occurred",
};

return {
call,
status: ToolResultStatus.Error,
message: stringifyError(error),
message: "Error occurred",
};
}
}
Expand Down

0 comments on commit 128b4c1

Please sign in to comment.