summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2021-10-01 05:06:02 +0000
committerAsh McKenzie <amckenzie@gitlab.com>2021-10-01 05:06:02 +0000
commit2dafe37c77233152b55e1c5d893a81a9cffd2618 (patch)
tree254a2151aa5fd94c50b1b0c3112079f25e99c7b9
parent6d146c217dc1ba78aa4a0c47c59b5b2e7be774d9 (diff)
parentf94f640ec40deddd1f57049d3e4c25a12adaf367 (diff)
downloadgitlab-shell-2dafe37c77233152b55e1c5d893a81a9cffd2618.tar.gz
Merge branch '499-log-me-more-more' into 'main'
Resolve an error-swallowing issue Closes #499 See merge request gitlab-org/gitlab-shell!533
-rw-r--r--internal/command/lfsauthenticate/lfsauthenticate.go7
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
}