From 196a59450cfe8687f86b1c61bb794a8d60f58adb Mon Sep 17 00:00:00 2001 From: liurong Date: Fri, 10 Nov 2023 15:25:40 +0800 Subject: [PATCH] fix up --- clients/config_client/config_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/config_client/config_client.go b/clients/config_client/config_client.go index d78f80f3..54ee973e 100644 --- a/clients/config_client/config_client.go +++ b/clients/config_client/config_client.go @@ -247,7 +247,7 @@ func (client *ConfigClient) getConfigInner(param *vo.ConfigParam) (content strin logger.Warnf("read config from cache success, dataId=%s, group=%s, namespaceId=%s", param.DataId, param.Group, clientConfig.NamespaceId) return cacheContent, nil } - if response != nil && !response.IsSuccess() { + if response != nil && response.Response != nil && !response.IsSuccess() { return response.Content, errors.New(response.GetMessage()) } param.EncryptedDataKey = response.EncryptedDataKey @@ -518,7 +518,7 @@ func (client *ConfigClient) refreshContentAndCheck(cacheData cacheData, notify b cacheData.group, cacheData.tenant) return } - if configQueryResponse != nil && !configQueryResponse.IsSuccess() { + if configQueryResponse != nil && configQueryResponse.Response != nil && !configQueryResponse.IsSuccess() { logger.Errorf("refresh cached config from server error:%v, dataId=%s, group=%s", configQueryResponse.GetMessage(), cacheData.dataId, cacheData.group) return