From 25d893218df2ad9223d5c1bce6c41fdc14a7982a Mon Sep 17 00:00:00 2001 From: FreezingM <384511401@qq.com> Date: Fri, 21 Aug 2026 16:40:04 +0800 Subject: [PATCH] fix(polyfill): suppress mobile-subscription billing 400 toasts --- web-shell/codex-bridge-polyfill.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web-shell/codex-bridge-polyfill.js b/web-shell/codex-bridge-polyfill.js index 4255926..3fa005a 100644 --- a/web-shell/codex-bridge-polyfill.js +++ b/web-shell/codex-bridge-polyfill.js @@ -1248,7 +1248,13 @@ /** 只兜底展示 fetch 形态的 IPC 兼容错误,invoke 错误交给官方前端调用栈自然处理。 */ function shouldSurfaceFetchIpcError(status, message) { - if (status === 400) return true; + if (status === 400) { + // 移动订阅(App Store / Google Play)的账单/支付方式提示对使用无影响,静默忽略,避免误弹故障弹窗 + if (/payment methods for mobile subscriptions|mobile subscriptions must be managed/i.test(message || "")) { + return false; + } + return true; + } return /unsupported codex ipc channel|method not found|no electron ipc handler|invalid ipc channel/i.test( message || "" );