Copilot commented on code in PR #2945:
URL: https://github.com/apache/dubbo-go/pull/2945#discussion_r2188152670
##########
protocol/triple/triple.go:
##########
@@ -85,10 +85,17 @@ func (tp *TripleProtocol) openServer(invoker base.Invoker,
info *common.ServiceI
panic("[TRIPLE Protocol]" + url.Key() + "is not existing")
}
- // TODO: handle errors
- tripleConfRaw, _ := url.GetAttribute(constant.TripleConfigKey)
- // TODO: verificate the tripleConf
- tripleConf, _ := tripleConfRaw.(*global.TripleConfig)
+ tripleConfRaw, ok := url.GetAttribute(constant.TripleConfigKey)
+ if !ok {
+ logger.Errorf("Triple config is not found for url: %s",
url.Key())
+ return
Review Comment:
Silent return on missing configuration may lead to unnoticed startup
failures; consider returning an error or propagating this failure to the caller
instead of simply logging.
--
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]