feat(cliproxy): 日志面板展示后端透传的具体错误原因#201
Merged
Merged
Conversation
接 PR #200:管理 API 客户端已把上游 400 错误正文拼到 message 上, 但前端日志面板仍只展示 logsLoadFailed 通用文案,把根因吞掉。 现在 panel 在 isError 时额外展示 error.message —— 例如 CLIProxyAPI 端 未启用 LoggingToFile 时,用户能直接看到 "logging to file disabled", 不再需要去后端日志里翻栈才知道为什么 502。
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #201 +/- ##
==========================================
- Coverage 74.44% 74.44% -0.01%
==========================================
Files 160 160
Lines 11624 11626 +2
Branches 3980 3982 +2
==========================================
+ Hits 8654 8655 +1
Misses 1731 1731
- Partials 1239 1240 +1
🚀 New features to boost your workflow:
|
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
接 PR #200:v0.5.1 已经把 CLIProxyAPI 上游 4xx 的错误正文拼到
CliproxyManagementApiError.message上,但前端日志面板仍只展示通用的logsLoadFailed文案,把真正的根因(如logging to file disabled)吞掉。现在 panel 在
isError时额外展示error.message—— 例如 CLIProxyAPI 端未启用LoggingToFile时,用户能直接在 UI 上看到 "logging to file disabled",不再需要去翻后端日志才知道为什么 502。Changes
src/components/admin/cliproxy-instance-logs-panel.tsx:错误态新增第二行展示error.message,灰字、可换行Test plan