Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Pitino <fpitino@gitlab.com>2019-07-16 09:57:38 +0300
committerFabio Pitino <fpitino@gitlab.com>2019-07-16 09:57:38 +0300
commit5a4e3a4c9eff84e0dba0662b53d6d755bddf984f (patch)
treec95d779827e4d15b313477393379ca6764f539ec
parenta4ff92d91b7e499f98d8eb3a9cef5ac8a289eb58 (diff)
Wrap all errors in ListCommitsByRefName
-rw-r--r--internal/service/commit/list_commits_by_ref_name.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/service/commit/list_commits_by_ref_name.go b/internal/service/commit/list_commits_by_ref_name.go
index 1e006f7bf..f8a79fd03 100644
--- a/internal/service/commit/list_commits_by_ref_name.go
+++ b/internal/service/commit/list_commits_by_ref_name.go
@@ -4,6 +4,7 @@ import (
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/internal/git/catfile"
gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log"
+ "gitlab.com/gitlab-org/gitaly/internal/helper"
"gitlab.com/gitlab-org/gitaly/internal/helper/chunk"
)
@@ -12,7 +13,7 @@ func (s *server) ListCommitsByRefName(in *gitalypb.ListCommitsByRefNameRequest,
c, err := catfile.New(ctx, in.Repository)
if err != nil {
- return err
+ return helper.ErrInternal(err)
}
sender := chunk.New(&commitsByRefNameSender{stream: stream})
@@ -23,11 +24,11 @@ func (s *server) ListCommitsByRefName(in *gitalypb.ListCommitsByRefNameRequest,
continue
}
if err != nil {
- return err
+ return helper.ErrInternal(err)
}
if err := sender.Send(commit); err != nil {
- return err
+ return helper.ErrInternal(err)
}
}