惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Vercel News
Vercel News
F
Fortinet All Blogs
B
Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
月光博客
月光博客

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(browser): keep transient fetch errors retryable · ope...
steipete · 2026-04-25 · via Recent Commits to openclaw:main

@@ -127,6 +127,27 @@ function appendBrowserToolModelHint(message: string): string {

127127

return `${message} ${BROWSER_TOOL_MODEL_HINT}`;

128128

}

129129130+

type BrowserFetchFailureKind = "timeout" | "aborted" | "persistent";

131+132+

function classifyBrowserFetchFailure(err: unknown): BrowserFetchFailureKind {

133+

const msg = normalizeErrorMessage(err);

134+

const msgLower = normalizeLowercaseStringOrEmpty(msg);

135+

const nameLower = err instanceof Error ? normalizeLowercaseStringOrEmpty(err.name) : "";

136+

const looksLikeTimeout =

137+

nameLower.includes("timeout") || msgLower.includes("timed out") || msgLower.includes("timeout");

138+

if (looksLikeTimeout) {

139+

return "timeout";

140+

}

141+

const looksLikeAbort =

142+

nameLower === "aborterror" ||

143+

msgLower.includes("aborterror") ||

144+

msgLower.includes("aborted") ||

145+

msgLower.includes("abort") ||

146+

msgLower.includes("cancelled") ||

147+

msgLower.includes("canceled");

148+

return looksLikeAbort ? "aborted" : "persistent";

149+

}

150+130151

async function discardResponseBody(res: Response): Promise<void> {

131152

try {

132153

await res.body?.cancel();

@@ -137,32 +158,36 @@ async function discardResponseBody(res: Response): Promise<void> {

137158138159

function enhanceDispatcherPathError(url: string, err: unknown): Error {

139160

const msg = normalizeErrorMessage(err);

140-

const suffix = `${resolveBrowserFetchOperatorHint(url)} ${BROWSER_TOOL_MODEL_HINT}`;

161+

const kind = classifyBrowserFetchFailure(err);

162+

const suffix =

163+

kind === "persistent"

164+

? `${resolveBrowserFetchOperatorHint(url)} ${BROWSER_TOOL_MODEL_HINT}`

165+

: resolveBrowserFetchOperatorHint(url);

141166

const normalized = msg.endsWith(".") ? msg : `${msg}.`;

142167

return new Error(`${normalized} ${suffix}`, err instanceof Error ? { cause: err } : undefined);

143168

}

144169145170

function enhanceBrowserFetchError(url: string, err: unknown, timeoutMs: number): Error {

146171

const operatorHint = resolveBrowserFetchOperatorHint(url);

147-

const msg = String(err);

148-

const msgLower = normalizeLowercaseStringOrEmpty(msg);

149-

const looksLikeTimeout =

150-

msgLower.includes("timed out") ||

151-

msgLower.includes("timeout") ||

152-

msgLower.includes("aborted") ||

153-

msgLower.includes("abort") ||

154-

msgLower.includes("aborterror");

155-

if (looksLikeTimeout) {

172+

const msg = normalizeErrorMessage(err);

173+

const kind = classifyBrowserFetchFailure(err);

174+

if (kind === "timeout") {

175+

return new Error(

176+

`Can't reach the OpenClaw browser control service (timed out after ${timeoutMs}ms). ${operatorHint}`,

177+

err instanceof Error ? { cause: err } : undefined,

178+

);

179+

}

180+

if (kind === "aborted") {

156181

return new Error(

157-

appendBrowserToolModelHint(

158-

`Can't reach the OpenClaw browser control service (timed out after ${timeoutMs}ms). ${operatorHint}`,

159-

),

182+

`Browser control request was cancelled. ${operatorHint}`,

183+

err instanceof Error ? { cause: err } : undefined,

160184

);

161185

}

162186

return new Error(

163187

appendBrowserToolModelHint(

164188

`Can't reach the OpenClaw browser control service. ${operatorHint} (${msg})`,

165189

),

190+

err instanceof Error ? { cause: err } : undefined,

166191

);

167192

}

168193