yxrxy commented on code in PR #3059:
URL: https://github.com/apache/dubbo-go/pull/3059#discussion_r2448602000
##########
config_center/nacos/impl.go:
##########
@@ -168,7 +168,12 @@ func (n *nacosDynamicConfiguration) GetRule(key string,
opts ...config_center.Op
Group: resolvedGroup,
})
if err != nil {
- return "", perrors.WithStack(err)
+ if strings.Contains(err.Error(), "config data not exist") {
+ logger.Warnf("query rule fail, key=%s, group=%s,
err=%v", key, resolvedGroup, err)
+ return "", nil
Review Comment:
// config_client.go lines 220-221
if response != nil && response.Response != nil && !response.IsSuccess() {
return response.Content, response.EncryptedDataKey,
errors.New(response.GetMessage())
}
Nacos SDK没有为"config data not exist"定义特定的错误类型,
nacos服务器返回什么消息,客户端就用errors.New()创建什么错误
无法通过类型来区分不同的错误情况
--
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]