fix: include error code in Responses failure events#21
Open
AmPlace wants to merge 1 commit into
Open
Conversation
AmPlace
marked this pull request as ready for review
July 23, 2026 10:40
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.
变更说明
Responses 协议的两条失败事件构造路径目前只会写入
type和message:Failure(...)LiveStreamer.Fail(...)部分 Responses 客户端会读取
response.failed.response.error.code。字段缺失时,客户端无法按正常的 Responses 错误结构处理失败事件。这个 PR 在两条路径里补上
code,值与已经规范化后的errorType保持一致;没有传入错误类型时,继续使用现有的server_error默认值。修改只影响
response.failed的错误对象,不改变事件顺序、结束帧或其他流式行为。测试
新增断言覆盖普通失败序列和已经启动后的流式失败路径:
结果:
另外运行了:
未发现补丁格式问题。