From e4561b6aa638ef3e61a37130e8f04db2bb878132 Mon Sep 17 00:00:00 2001 From: imxyb Date: Tue, 26 Nov 2019 21:52:04 +0800 Subject: [PATCH] should return error when `NewURL` failed. Signed-off-by: imxyb --- config_center/parser/configuration_parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_center/parser/configuration_parser.go b/config_center/parser/configuration_parser.go index 1ce6594017..85033ce97f 100644 --- a/config_center/parser/configuration_parser.go +++ b/config_center/parser/configuration_parser.go @@ -134,14 +134,14 @@ func serviceItemToUrls(item ConfigItem, config ConfiguratorConfig) ([]*common.UR newUrlStr = newUrlStr + v url, err := common.NewURL(context.Background(), newUrlStr) if err != nil { - perrors.WithStack(err) + return nil, perrors.WithStack(err) } urls = append(urls, &url) } } else { url, err := common.NewURL(context.Background(), urlStr) if err != nil { - perrors.WithStack(err) + return nil, perrors.WithStack(err) } urls = append(urls, &url) }