Mishig commited on
Commit
59077fd
·
unverified ·
1 Parent(s): a5070fd

Generic tool error msg "Error occurred" (#1193)

Browse files
src/lib/server/textGeneration/tools.ts CHANGED
@@ -92,19 +92,19 @@ async function* callTool(
92
  return { ...toolResult, call } as ToolResult;
93
  } catch (error) {
94
  MetricsServer.getMetrics().tool.toolUseCountError.inc({ tool: call.name });
95
- logger.error(error, `Failed while running tool ${call.name}`);
96
 
97
  yield {
98
  type: MessageUpdateType.Tool,
99
  subtype: MessageToolUpdateType.Error,
100
  uuid,
101
- message: stringifyError(error),
102
  };
103
 
104
  return {
105
  call,
106
  status: ToolResultStatus.Error,
107
- message: stringifyError(error),
108
  };
109
  }
110
  }
 
92
  return { ...toolResult, call } as ToolResult;
93
  } catch (error) {
94
  MetricsServer.getMetrics().tool.toolUseCountError.inc({ tool: call.name });
95
+ logger.error(error, `Failed while running tool ${call.name}. ${stringifyError(error)}`);
96
 
97
  yield {
98
  type: MessageUpdateType.Tool,
99
  subtype: MessageToolUpdateType.Error,
100
  uuid,
101
+ message: "Error occurred",
102
  };
103
 
104
  return {
105
  call,
106
  status: ToolResultStatus.Error,
107
+ message: "Error occurred",
108
  };
109
  }
110
  }