Editor load errors display raw exception text to users
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
调研方向
从 ios/Sources/GutenbergKit/Sources/EditorViewController.swift 中的 displayError 以及 android/Gutenberg/src/main/java/org/wordpress/gutenberg/GutenbergView.kt 中的 EditorErrorView/showErrorPhase 开始。检查 EditorHttpClient.kt 的第 85–88 行,以及它与 #603 中提议的类型化 EditorLoadFailure 之间的关系。完成的标准是两个平台都显示适合用户的 auth 或可重试消息,同时原始详细信息仍可用于日志和遥测。
由索引模型根据 Issue 内容生成。
描述
Description
When the editor fails to load, both platforms render the underlying exception message directly in the library's error view. These strings are written for developers, and they reach users of both production apps.
Examples seen in testing:
- iOS:
No route was found matching the URL and request method. - Android:
rest_no_route: No route was found matching the URL and request method. - Android:
Unknown error with status code: 500 - Android:
Failed to load editor; unable to resolve host…
Android additionally prefixes the machine-readable WP error code, because WPErrorResponse.message is built as "${error.code}: ${error.message}" (EditorHttpClient.kt#L85-L88).
This is not demo-only
The error views live in the library, and neither host app can override them:
- iOS:
displayErrorrenderserror.localizedDescription(EditorViewController.swift#L1015-L1025).didFailToLoadis documented as firing after the error is displayed, and WP-iOS's implementation is analytics-only. - Android:
GutenbergViewownsEditorErrorViewand callsshowErrorPhasedirectly (GutenbergView.kt#L373-L384). WP-Android embedsGutenbergViewand inherits the view as-is.
Proposed change
- Map failure classes to user-appropriate copy rather than echoing exception text
- Auth failures: something actionable, e.g. "Sign in again to continue editing"
- Server/network failures: a generic retryable message
- Keep the raw error for logs and telemetry, not the UI
- Android: stop prefixing the WP error code in user-visible text
- Consider a retry affordance where the failure is retryable
Notes
- #602 removes the
rest_no_routemessage from this view entirely, and #603 removes most transient 5xx cases under automatic fallback. What remains — auth failures, and everything under disabled fallback — still needs real copy, so this is worth doing independently and is lower priority than both. - Pairs naturally with the typed
EditorLoadFailureproposed in #603: the classification that drives host behavior can also drive the message.
- 主要语言
- JavaScript
- 星标
- 29
- 派生
- 7
- 平均合并
- 3 天 6 小时
- 30 天内合并 PR
- 92
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wordpress-mobile/GutenbergKit 的其他 Issue
-
[Type] Bug [Type] Code Quality iOS
难度 2/5 1-3 小时 新手友好度 88/100
wordpress-mobile/GutenbergKit#668 ·
维护者通常 1 天内回复
-
[Type] Bug [Type] Performance iOS
难度 2/5 1-3 小时 新手友好度 88/100
wordpress-mobile/GutenbergKit#666 ·
维护者通常 1 天内回复
-
[Type] Bug iOS
难度 2/5 1-3 小时 新手友好度 78/100
wordpress-mobile/GutenbergKit#664 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
wordpress-mobile/GutenbergKit#522 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
wordpress-mobile/GutenbergKit#443 ·
维护者通常 1 天内回复
查看 wordpress-mobile/GutenbergKit 的全部 Issue
相似的 Issue
-
bug/1-unconfirmed kind/bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 74/100
521xueweihan/HelloGitHub#4010 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
BUG
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
[BUG]: filesystem-edit-file converts a CRLF file's line endings to LF on every edit可能已有人在做 @MohammadHijjawi97 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
Mintplex-Labs/anything-llm#6755 ·
维护者通常 1 天内回复