From afe1f83bdbec2c369c0840c94df1d12c8faa0eeb Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Fri, 24 Nov 2017 14:21:37 +0100 Subject: Improved and fixed connection to XDS Server Signed-off-by: Sebastien Douheret --- lib/agent/apiv1-version.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/agent') diff --git a/lib/agent/apiv1-version.go b/lib/agent/apiv1-version.go index c75e7f5..c73010e 100644 --- a/lib/agent/apiv1-version.go +++ b/lib/agent/apiv1-version.go @@ -1,11 +1,11 @@ package agent import ( + "fmt" "net/http" "github.com/gin-gonic/gin" "github.com/iotbzh/xds-agent/lib/apiv1" - common "github.com/iotbzh/xds-common/golib" ) // getInfo : return various information about server @@ -23,8 +23,10 @@ func (s *APIService) getVersion(c *gin.Context) { for _, svr := range s.xdsServers { res := apiv1.VersionData{} if err := svr.GetVersion(&res); err != nil { - common.APIError(c, "Cannot retrieve version of XDS server ID %s : %v", svr.ID, err.Error()) - return + errMsg := fmt.Sprintf("Cannot retrieve version of XDS server ID %s : %v", svr.ID, err.Error()) + s.Log.Warning(errMsg) + res.ID = svr.ID + res.Version = errMsg } svrVer = append(svrVer, res) } -- cgit 1.2.3-korg