Allow "throwing" in server streams
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #335 来自 @Monkatraz —— 已关闭,未合并
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
调研方向
Start by tracing how the server stream handler represents the protocol's UNCAUGHT_ERROR and how errors thrown outside the main handler currently behave. Define the ctx.uncaught entry point so a callback or background task can end the request with the same semantics as throwing inside the handler, then verify streaming requests receive the expected internal error.
由索引模型根据 Issue 内容生成。
描述
UNCAUGHT_ERROR is built into the protocol, it means the server encountered an internal error in processing the request.
We've noticed that people use this correctly when using unary rpcs but not all the time in streaming rpcs. The reason being is that if you're outside the main handler function (i.e. in a callback or background task), you have no way of triggering an internal error, throwing will not be caught by the handler.
This leads people to define error types that are basically unhandlable by the client and are effectively custom internal errors. This leads to bad error hygiene on the client side.
We should have a way to basically end the request with an uncaught, something like ctx.uncaught(new Error("something went wrong")), which would end the request following similar semantics as throwing within the handler.
- 主要语言
- TypeScript
- 星标
- 101
- 派生
- 11
- 平均合并
- 7 小时 21 分钟
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
replit/river 的其他 Issue
相似的 Issue
-
Shell: serve the home app's Cookie Policy on a hard reload可能已有人在做 @2001anshkaushik 今天认领。 未关闭feature module:ai
难度 2/5 1-3 小时 新手友好度 88/100
rocketride-org/rocketride-server#2899 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
wazuh/wazuh-dashboard-plugins#9551 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
gofish-graphics/gofish-graphics#1252 ·
维护者通常 1 天内回复
-
optimization P3 size:XS
难度 1/5 1-3 小时 新手友好度 88/100
josephfung/curia#2366 ·
维护者通常 1 天内回复
-
type:bug
难度 2/5 1-3 小时 新手友好度 65/100
nightgauge/nightgauge#2688 ·
维护者通常 1 天内回复