kitex
kitex copied to clipboard
Kitex code panic on unhashable error returned by biz handler
gRPC 协议下出现,
https://github.com/cloudwego/kitex/blob/38eb963902e01c5402c0d168be964a152df7572f/pkg/remote/trans/nphttp2/codes.go#L63 这一行,业务方传的 error 可能是不能作为 map 的 key 的,这种情况下,kitex 这行会 panic:
error=runtime error: hash of unhashable type mongo.CommandError
@zeeshen thanks, we will fix it soon
你在 handler 中是怎么返回 err 触发这个问题的?如果是 biz error,不会走到这一行。
@zeeshen Already fixed in v0.9.1 (PR: https://github.com/cloudwego/kitex/pull/1286)
cc @HeyJavaBean @joway