Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: rethrow AbortError from caller signal instead of mapping to OPENCLAW_TIMEOUT

[._.]/ Adam Eivy54725e287883
diff --git a/server/integrations/openclaw/api.js b/server/integrations/openclaw/api.js
index 17774e7bb6..3c0a129ba1 100644
--- a/server/integrations/openclaw/api.js
+++ b/server/integrations/openclaw/api.js
@@ -188,6 +188,10 @@ async function openClawFetch(config, path, { method = 'GET', headers = {}, body,
}, timeoutMs ?? config.timeoutMs);
} catch (err) {
if (err?.name === 'AbortError') {
+ // If the caller's signal triggered the abort, rethrow the AbortError so
+ // the caller can distinguish a client-disconnect abort from a timeout.
+ // Only emit OPENCLAW_TIMEOUT when the internal timeout actually fired.
+ if (signal?.aborted) throw err;
throw new ServerError('OpenClaw request timed out', {
status: 504,
code: 'OPENCLAW_TIMEOUT'