fix(cli): preserve structured API error context#2803
Open
qin-ctx wants to merge 1 commit into
Open
Conversation
485a8f3 to
5eaa608
Compare
5eaa608 to
bc412d6
Compare
ZaynJarvis
approved these changes
Jun 24, 2026
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.
Description
改进
ov_cli对 OpenViking API、请求、响应、超时和服务健康错误的分类与展示,保留后端返回的结构化错误 code、HTTP status 和 details,并让中文错误提示与恢复动作更准确。Related Issue
暂无关联 issue。
Type of Change
Changes Made
set-tags帮助入口。Before / After examples:
PROCESSING_ERRORPROCESSING_ERROR: Parse error: boom,verbose 保留 HTTP status、code 和 details。Request Timeout,提示 OpenViking 未在当前超时时间内响应。/health返回{"healthy": false}ov configwizard 可能落到泛化提示,让用户检查 API key / URL。/health返回 200 但响应体不是合法 JSONov config validate可能显示 Auth accepted、Health healthy。Testing
cargo test -p ov_cli -- --test-threads=1Checklist
Screenshots (if applicable)
ov config validateagainst a server whose/healthreturns HTTP 200 with an invalid JSON body:config-validate-before.dark.pnghereconfig-validate-after.dark.pnghereBefore incorrectly renders the unknown validation failure as
认证 已通过and健康状态 健康. After renders the same case as认证 未检查and健康状态 未检查.Light theme captures are also available if preferred:
config-validate-before.light.pngconfig-validate-after.light.pngAdditional Notes
不适用。