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

推荐订阅源

宝玉的分享
宝玉的分享
I
InfoQ
B
Blog
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
量子位
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
美团技术团队
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
罗磊的独立博客
博客园 - 聂微东
IT之家
IT之家

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(gateway): explain protocol mismatches · openclaw/open...
steipete · 2026-05-17 · via Recent Commits to openclaw:main

@@ -18,6 +18,7 @@ export const ConnectErrorDetailCodes = {

1818

AUTH_TAILSCALE_WHOIS_FAILED: "AUTH_TAILSCALE_WHOIS_FAILED",

1919

AUTH_TAILSCALE_IDENTITY_MISMATCH: "AUTH_TAILSCALE_IDENTITY_MISMATCH",

2020

CONTROL_UI_ORIGIN_NOT_ALLOWED: "CONTROL_UI_ORIGIN_NOT_ALLOWED",

21+

PROTOCOL_MISMATCH: "PROTOCOL_MISMATCH",

2122

CONTROL_UI_DEVICE_IDENTITY_REQUIRED: "CONTROL_UI_DEVICE_IDENTITY_REQUIRED",

2223

DEVICE_IDENTITY_REQUIRED: "DEVICE_IDENTITY_REQUIRED",

2324

DEVICE_AUTH_INVALID: "DEVICE_AUTH_INVALID",

@@ -461,5 +462,41 @@ export function formatConnectErrorMessage(params: { message?: string; details?:

461462

if (readConnectErrorDetailCode(params.details) === ConnectErrorDetailCodes.PAIRING_REQUIRED) {

462463

return formatConnectPairingRequiredMessage(params.details);

463464

}

465+

if (readConnectErrorDetailCode(params.details) === ConnectErrorDetailCodes.PROTOCOL_MISMATCH) {

466+

return formatProtocolMismatchMessage(params.message, params.details);

467+

}

464468

return normalizeOptionalString(params.message) ?? "gateway request failed";

465469

}

470+471+

function formatProtocolMismatchMessage(message: string | undefined, details: unknown): string {

472+

const raw = details as {

473+

clientMinProtocol?: unknown;

474+

clientMaxProtocol?: unknown;

475+

expectedProtocol?: unknown;

476+

minimumProbeProtocol?: unknown;

477+

};

478+

const clientMin = normalizeProtocolNumber(raw.clientMinProtocol);

479+

const clientMax = normalizeProtocolNumber(raw.clientMaxProtocol);

480+

const expected = normalizeProtocolNumber(raw.expectedProtocol);

481+

const probeMin = normalizeProtocolNumber(raw.minimumProbeProtocol);

482+

const parts: string[] = [];

483+

if (clientMin !== undefined && clientMax !== undefined) {

484+

parts.push(

485+

clientMin === clientMax

486+

? `Control UI v${clientMin}`

487+

: `Control UI v${clientMin}-v${clientMax}`,

488+

);

489+

}

490+

if (expected !== undefined) {

491+

parts.push(`Gateway v${expected}`);

492+

}

493+

if (probeMin !== undefined) {

494+

parts.push(`probe min v${probeMin}`);

495+

}

496+

const normalized = normalizeOptionalString(message) ?? "protocol mismatch";

497+

return parts.length > 0 ? `${normalized}: ${parts.join(", ")}` : normalized;

498+

}

499+500+

function normalizeProtocolNumber(value: unknown): number | undefined {

501+

return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : undefined;

502+

}