fix(polyfill): suppress mobile-subscription billing 400 toasts - #47
Open
FreezingM wants to merge 1 commit into
Open
fix(polyfill): suppress mobile-subscription billing 400 toasts#47FreezingM wants to merge 1 commit into
FreezingM wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
Suppress the spurious danger toast shown on every new session when the account's ChatGPT subscription is billed through a mobile platform (Apple App Store / Google Play). The runtime's billing check returns HTTP 400 with "Payment methods for mobile subscriptions must be managed in the mobile platform." —
shouldSurfaceFetchIpcErrortreated any 400 as a fatal IPC error, but this one is harmless and the official app silently ignores it.修复一个问题:当 ChatGPT 订阅走移动平台(App Store / Google Play)扣费时,新建会话时的账单检查会返回 HTTP 400("Payment methods for mobile subscriptions must be managed in the mobile platform.")。
shouldSurfaceFetchIpcError把一切 400 都当作致命 IPC 错误来弹窗,但这类账单提示对使用毫无影响,官方 App 也是静默忽略的——结果就是每次新建会话都会误弹一次故障提示。What changed / 改动内容
web-shell/codex-bridge-polyfill.js,shouldSurfaceFetchIpcErrornow ignores 400 responses whose message matches the mobile-subscription billing pattern; all other 400s and IPC channel errors still surface unchanged.web-shell/codex-bridge-polyfill.js的shouldSurfaceFetchIpcError中,忽略消息匹配「移动订阅账单」模式的 400 响应;其余 400 与 IPC 通道错误仍照常提示,行为不变。Verification / 验证