@botbotgo/better-call 0.1.33 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/demo.mjs +6 -2
package/package.json
CHANGED
package/scripts/demo.mjs
CHANGED
|
@@ -61,7 +61,11 @@ let wrappedOutput;
|
|
|
61
61
|
try {
|
|
62
62
|
wrappedOutput = await wrappedStockQuote.invoke(malformedRepairArgs);
|
|
63
63
|
} catch (error) {
|
|
64
|
-
|
|
64
|
+
const context = `tool=stock_quote args=${JSON.stringify(malformedRepairArgs)}`;
|
|
65
|
+
const message = `${errorMessage(error)} (${context})`;
|
|
66
|
+
const contextualError =
|
|
67
|
+
error instanceof Error ? new Error(message, { cause: error }) : new Error(message);
|
|
68
|
+
exitWithError("wrapped stock_quote invocation", contextualError);
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
let reliableResult = null;
|
|
@@ -144,7 +148,7 @@ if (json) {
|
|
|
144
148
|
console.log("3. Gateway tool-name repair");
|
|
145
149
|
console.log(` status: ${report.gatewayRepair.status}`);
|
|
146
150
|
console.log(` tool: ${report.gatewayRepair.originalToolName} -> ${report.gatewayRepair.toolName}`);
|
|
147
|
-
console.log(` reason: ${report.gatewayRepair.reason}`);
|
|
151
|
+
console.log(` reason: ${report.gatewayRepair.reason ?? "(none)"}`);
|
|
148
152
|
console.log("");
|
|
149
153
|
console.log("Run with --json for the full structured result.");
|
|
150
154
|
}
|