From dbd3ed49ed2cc41795a248f99483b74f04b5707a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:59:17 +0800 Subject: [PATCH] tidy code --- internal/api/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 4ab27e3f4..5e77ea9de 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -38,7 +38,7 @@ func UserRegister(c *gin.Context) { reply, err := client.UserRegister(context.Background(), req) if err != nil || reply.CommonResp.ErrCode != 0 { log.NewError(req.OperationID, "UserRegister failed ", err, reply.CommonResp.ErrCode) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": reply.CommonResp.ErrMsg}) return }