diff --git a/topology/server/handler/handler.go b/topology/server/handler/handler.go index dd987a7bc4b16a663711564dbb7300e4812d0423..9eddad8c16123a5a8fab1ae3e399c24d2dd0815b 100644 --- a/topology/server/handler/handler.go +++ b/topology/server/handler/handler.go @@ -34,9 +34,10 @@ func SingleHostHandle(ctx *gin.Context) { ctx.JSON(http.StatusBadRequest, gin.H{ "code": -1, - "error": err, + "error": err.Error(), "data": nil, }) + return } ctx.JSON(http.StatusOK, gin.H{ @@ -73,7 +74,7 @@ func MultiHostHandle(ctx *gin.Context) { ctx.JSON(http.StatusBadRequest, gin.H{ "code": -1, - "error": err, + "error": err.Error(), "data": nil, }) return