Alanxtl commented on code in PR #3837:
URL: https://github.com/apache/dubbo-go/pull/3837#discussion_r4640385254
##########
protocol/dubbo/dubbo_codec.go:
##########
@@ -313,7 +314,7 @@ func (c *DubboCodec) decodeResponse(data []byte)
(*remoting.Response, int, error
if pkg.Err != nil {
rpcResult.Err = pkg.Err
} else if pkg.Body.(*impl.ResponsePayload).Exception != nil {
- rpcResult.Err =
pkg.Body.(*impl.ResponsePayload).Exception
+ rpcResult.Err =
classifyResponseException(response.Status,
pkg.Body.(*impl.ResponsePayload).Exception)
Review Comment:
Dubbo 异步回调收到的异常类型变了。 decodeResponse 把包装后的错误写进 Response.Error,异步回调会直接收到这个
Response。用真实 TCP 响应验证,`err.(*hessian.GenericException)` 在 develop 上成功,在 PR
上收到的是 *rpcerror.kindError,直接断言会失败。建议把分类信息留在观测链路,回调继续收到解码后的原始异常。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]