From d457c8138cc8744ef7421ecfefbc25848a245cc6 Mon Sep 17 00:00:00 2001
From: imxyb <xyb4638@gmail.com>
Date: Tue, 26 Nov 2019 21:52:04 +0800
Subject: [PATCH] should return error when `NewURL` failed.

Signed-off-by: imxyb <xyb4638@gmail.com>
---
 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 1ce659401..85033ce97 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)
 		}
-- 
GitLab