Repository navigation
fix(139): surface SMS verification during refresh fallback - #190
Merged
Merged
Conversation
When a refresh failure triggers password login and 139 Mail asks for an SMS code, propagate Yun139SmsRequiredError instead of swallowing it and reporting only the original refresh error. The refreshed mail_cookies are still persisted first, so the next save with sms_code can continue. Tests: 139 driver 25/25, tsc clean.
4 tasks done
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.
后续 PR 正文
fix(139): surface SMS verification during refresh fallbackSummary / 摘要
#164 的 squash merge 漏掉了最后一个提交
ff8c863。本 PR 补上这一行:刷新失败触发密码重登录、且 139 邮箱要求短信验证时,不再吞掉Yun139SmsRequiredError,而是先保存更新后的MailCookies,再把“请填写sms_code”的错误抛给用户。Motivation / 背景
9bfd4fe,缺少ff8c863。tryReLogin()捕获短信风控异常后只写 debug 日志并return false,外层最终抛出 PC/旧接口刷新错误,用户看不到需要填写验证码的提示。loginAfterAuthorizationFailure不一致:Go 会把登录错误(含短信提示)返回给用户。Changes / 改动内容
src/backend/drivers/139/util.ts:tryReLogin()捕获Yun139SmsRequiredError时:addition.mail_cookies;onLoginStateChange持久化;throw e,让调用方收到短信验证提示。return false。Testing / 验证
Compatibility / 兼容性
user_domain_id与Authorization的优先级。Checklist
tsc --noEmit通过ahead/behind = 1/0)