Skip to content

Commit b31643b

Browse files
committed
Throw ToolError on Playwright goto failure
Replace returning an error object with throwing a ToolError when Playwright goto fails in ComputerTool. This standardizes error handling so callers can catch exceptions and preserves the original response error or falls back to 'Playwright goto failed'.
1 parent 3541bbb commit b31643b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • pkg/templates/typescript/yutori-computer-use/tools

pkg/templates/typescript/yutori-computer-use/tools/computer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export class ComputerTool {
306306
timeout_sec: 60,
307307
});
308308
if (!response.success) {
309-
return { error: response.error ?? 'Playwright goto failed' };
309+
throw new ToolError(response.error ?? 'Playwright goto failed');
310310
}
311311
await this.sleep(ACTION_DELAY_MS);
312312
return this.screenshot();

0 commit comments

Comments
 (0)