diff --git a/server/auth/internal/logic/usergoogleloginlogic.go b/server/auth/internal/logic/usergoogleloginlogic.go index c4130d20..609e08a6 100644 --- a/server/auth/internal/logic/usergoogleloginlogic.go +++ b/server/auth/internal/logic/usergoogleloginlogic.go @@ -64,13 +64,13 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us token, err := googleOauthConfig.Exchange(l.ctx, req.Code) if err != nil { logx.Error(err) - resp.SetStatus(basic.CodeApiErr) + return resp.SetStatus(basic.CodeApiErr, err.Error()) } r, err := requests.Get("https://www.googleapis.com/oauth2/v2/userinfo?access_token=" + token.AccessToken).Execute() if err != nil { logx.Error(err) - return resp.SetStatus(basic.CodeOAuthGoogleApiErr) + return resp.SetStatus(basic.CodeOAuthGoogleApiErr, err.Error()) } log.Println(r.Json())