mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 18:04:32 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -45,12 +45,16 @@ export function toToolDefinitions(tools: AnyAgentTool[]): ToolDefinition[] {
|
||||
try {
|
||||
return await tool.execute(toolCallId, params, signal, onUpdate);
|
||||
} catch (err) {
|
||||
if (signal?.aborted) throw err;
|
||||
if (signal?.aborted) {
|
||||
throw err;
|
||||
}
|
||||
const name =
|
||||
err && typeof err === "object" && "name" in err
|
||||
? String((err as { name?: unknown }).name)
|
||||
: "";
|
||||
if (name === "AbortError") throw err;
|
||||
if (name === "AbortError") {
|
||||
throw err;
|
||||
}
|
||||
const described = describeToolExecutionError(err);
|
||||
if (described.stack && described.stack !== described.message) {
|
||||
logDebug(`tools: ${normalizedName} failed stack:\n${described.stack}`);
|
||||
|
||||
Reference in New Issue
Block a user