Copilot commented on code in PR #983:
URL: https://github.com/apache/dubbo-go-pixiu/pull/983#discussion_r3425013295
##########
pkg/filter/network/dubboproxy/manager.go:
##########
@@ -118,7 +116,7 @@ func (dcm *DubboProxyConnectionManager) OnTripleData(ctx
context.Context, method
ra, err := dcm.routerCoordinator.RouteByPathAndName(interfaceName,
methodName)
if err != nil {
- return nil, errors.Errorf("Requested dubbo rpc invocation route
not found")
+ return nil, perrors.Errorf("Requested dubbo rpc invocation
route not found")
Review Comment:
The new error message is still too generic for debugging. Include the lookup
inputs (e.g., interfaceName/methodName) in the error so operators can identify
which route key failed. For example, add the interface and method values to the
formatted message.
##########
pkg/filter/network/dubboproxy/manager.go:
##########
@@ -163,7 +161,7 @@ func (dcm *DubboProxyConnectionManager) OnData(data any)
(any, error) {
ra, err := dcm.routerCoordinator.RouteByPathAndName(path,
old_invoc.MethodName())
if err != nil {
- return nil, errors.Errorf("Requested dubbo rpc invocation route
not found")
+ return nil, perrors.Errorf("Requested dubbo rpc invocation
route not found")
Review Comment:
Same issue here: the error does not indicate which route lookup failed.
Include `path` and `old_invoc.MethodName()` in the error text to make triage
actionable.
##########
pkg/filter/network/dubboproxy/manager.go:
##########
@@ -182,7 +180,7 @@ func (dcm *DubboProxyConnectionManager)
handleRpcInvocation(c *dubbo2.RpcContext
defer func() {
if err := recover(); err != nil {
logger.Warnf("[dubbo-go-pixiu] Occur An Unexpected Err:
%+v", err)
- c.SetError(errors.Errorf("Occur An Unexpected Err: %v",
err))
+ c.SetError(perrors.Errorf("Occur An Unexpected Err:
%v", err))
Review Comment:
The phrase \"Occur An Unexpected Err\" is grammatically incorrect and
unclear for end users. Consider changing it to a clearer, conventional message
(e.g., \"unexpected error\" / \"panic recovered\"), keeping the logged details
for diagnostics.
--
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]