Repository navigation
fix: 接口出错时只显示 hub 的中文文案,反代错误页与断网按状态说明 - #13
Merged
Merged
Conversation
不是 text/plain 的错误回复来自反代或 CDN,不再把它的 HTML 显示给访客;断网、 200 却不是 JSON 也给出中文说明。错误信息不会再是空串,去掉两处兜底。
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.
api():只把text/plain的错误回复当 hub 的话原样显示;反代或 CDN 的错误页(如 nginx 的 502、Cloudflare 的拦截页)不再把 HTML 显示给访客,按状态码说明「服务暂时无法访问」或「请求被拦截」App.tsx、NodeDetail.tsx两处|| "网络错误"兜底配合 monitor-probe/monitor#63:hub 的错误回复改为一行中文纯文本。
测试
tsc -b、oxlint、npm test通过