Snow-kal commented on code in PR #3183:
URL: https://github.com/apache/dubbo-go/pull/3183#discussion_r2740268225


##########
protocol/dubbo/hessian2/hessian_dubbo.go:
##########
@@ -240,9 +240,22 @@ func (h *HessianCodec) ReadBody(rspObj any) error {
                }
                rsp, ok := rspObj.(*DubboResponse)
                if !ok {
-                       return perrors.Errorf("java exception:%s", 
exception.(string))
+                       return perrors.Errorf("java exception:%v", exception)
+               }
+               if g, ok := ToGenericException(exception); ok {
+                       rsp.Exception = g
+               } else if e, ok := exception.(error); ok {
+                       rsp.Exception = e
+               } else {
+                       rsp.Exception = perrors.Errorf("java exception:%v", 
exception)
+               }
+               if g, ok := ToGenericException(exception); ok {
+                       rsp.Exception = g
+               } else if e, ok := exception.(error); ok {
+                       rsp.Exception = e
+               } else {
+                       rsp.Exception = perrors.Errorf("java exception:%v", 
exception)
                }

Review Comment:
   已更改 我的问题,应该是之前按 copilot 修改的时候多复制了,感谢建议



-- 
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]

Reply via email to