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.
概要
问题
原实现只解析上游响应中的
error和error_description:{ "error": "invalid_grant", "error_description": "Access denied" }如果上游同时返回
message、detail、嵌套error.message或其他诊断字段,这些内容会被丢弃,管理端无法确认完整失败原因。同时,Tooltip 中不同字号、字重和等宽字体混用,响应正文还会重复展示已经提取的 Code 和 Message,影响可读性。
修改内容
OAuth 错误解析
errorerror_descriptionmessagedetaildescriptiontitleerror.code、error.message等字段…标记截断,不再静默省略。安全处理
响应详情写入数据库前会进行脱敏:
敏感值统一替换为:
数据与 API
账号凭据刷新状态新增:
lastRefreshErrorStatuslastRefreshErrorMessagelastRefreshErrorResponse刷新成功后会同时清空上述字段和原有错误码,避免继续展示过期错误。
历史数据保持兼容;旧记录无法还原此前未保存的完整响应,但不会影响账号列表和调用链路。
管理端 UI
失效状态 Tooltip 统一使用相同的字体、字号、字重和行高,以两列形式展示:
如果响应正文只包含已经展示的 Code 和 Message,则自动隐藏重复内容;只有存在额外字段时才显示脱敏详情。
验证
后端:
前端:
全部通过。