mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
fix: return 500 for tool execution failures instead of 400
Tool runtime errors are server-side faults, not client input errors. Returning 400 causes clients to mishandle retries/backoff. Addresses Greptile review feedback on #13185.
This commit is contained in:
committed by
Peter Steinberger
parent
f788de30c8
commit
242f2f1480
@@ -349,7 +349,7 @@ export async function handleToolsInvokeHttpRequest(
|
||||
sendJson(res, 200, { ok: true, result });
|
||||
} catch (err) {
|
||||
logWarn(`tools-invoke: tool execution failed: ${String(err)}`);
|
||||
sendJson(res, 400, {
|
||||
sendJson(res, 500, {
|
||||
ok: false,
|
||||
error: { type: "tool_error", message: "tool execution failed" },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user