From 7390779bc07028e13822687dbb0017f41d529cae Mon Sep 17 00:00:00 2001 From: Luke Gehorsam <luke@heroiclabs.com> Date: Mon, 30 Oct 2023 13:30:37 -0400 Subject: [PATCH] improve Steam logs on GetSteamProfile error --- social/social.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/social/social.go b/social/social.go index 9e8f3aa28..9db155e2a 100644 --- a/social/social.go +++ b/social/social.go @@ -626,12 +626,15 @@ func (c *Client) GetSteamProfile(ctx context.Context, publisherKey string, appID var profileWrapper SteamProfileWrapper err := c.request(ctx, "steam profile", path, nil, &profileWrapper) if err != nil { + c.logger.Debug("Error requesting Steam profile", zap.Error(err)) return nil, err } if profileWrapper.Response.Error != nil { + c.logger.Debug("Error returned from Steam after requesting Steam profile", zap.String("errorDescription", profileWrapper.Response.Error.ErrorDesc), zap.Int("errorCode", profileWrapper.Response.Error.ErrorCode)) return nil, fmt.Errorf("%v, %v", profileWrapper.Response.Error.ErrorDesc, profileWrapper.Response.Error.ErrorCode) } if profileWrapper.Response.Params == nil { + c.logger.Debug("No profile returned from Steam after requesting Steam profile") return nil, errors.New("no steam profile") } return profileWrapper.Response.Params, nil -- GitLab