diff options
author | Nick Thomas <nick@gitlab.com> | 2021-09-30 12:20:06 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2021-09-30 12:35:48 +0100 |
commit | f94f640ec40deddd1f57049d3e4c25a12adaf367 (patch) | |
tree | 254a2151aa5fd94c50b1b0c3112079f25e99c7b9 | |
parent | 6d146c217dc1ba78aa4a0c47c59b5b2e7be774d9 (diff) | |
download | gitlab-shell-499-log-me-more-more.tar.gz |
Resolve an error-swallowing issue499-log-me-more-more
-rw-r--r-- | internal/command/lfsauthenticate/lfsauthenticate.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/command/lfsauthenticate/lfsauthenticate.go b/internal/command/lfsauthenticate/lfsauthenticate.go index dab69ab..ac3aafc 100644 --- a/internal/command/lfsauthenticate/lfsauthenticate.go +++ b/internal/command/lfsauthenticate/lfsauthenticate.go @@ -6,6 +6,8 @@ import ( "encoding/json" "fmt" + "gitlab.com/gitlab-org/labkit/log" + "gitlab.com/gitlab-org/gitlab-shell/internal/command/commandargs" "gitlab.com/gitlab-org/gitlab-shell/internal/command/readwriter" "gitlab.com/gitlab-org/gitlab-shell/internal/command/shared/accessverifier" @@ -58,6 +60,11 @@ func (c *Command) Execute(ctx context.Context) error { payload, err := c.authenticate(ctx, operation, repo, accessResponse.UserId) if err != nil { // return nothing just like Ruby's GitlabShell#lfs_authenticate does + log.WithContextFields( + ctx, + log.Fields{"operation": operation, "repo": repo, "user_id": accessResponse.UserId}, + ).WithError(err).Debug("lfsauthenticate: execute: LFS authentication failed") + return nil } |