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:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-05-09 17:26:08 +0300
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-05-09 17:26:08 +0300
commit42a8c24c582b6e2412941af757cb3bf75aaf54cf (patch)
tree2664900bf57b64b752e051821d224bca14047474
parent0297dcf1dafe0d14bab35ef4ea35f9fd7d5506c0 (diff)
Decorate error for refs.FindDefaultBranchName
-rw-r--r--internal/service/ref/refs.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/service/ref/refs.go b/internal/service/ref/refs.go
index 051e9fb5a..dd9f6441d 100644
--- a/internal/service/ref/refs.go
+++ b/internal/service/ref/refs.go
@@ -8,6 +8,9 @@ import (
"log"
"strings"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+
pb "gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitaly/internal/helper"
"golang.org/x/net/context"
@@ -169,7 +172,7 @@ func (s *server) FindDefaultBranchName(ctx context.Context, in *pb.FindDefaultBr
defaultBranchName, err := defaultBranchName(repoPath)
if err != nil {
- return nil, err
+ return nil, grpc.Errorf(codes.Internal, err.Error())
}
return &pb.FindDefaultBranchNameResponse{Name: defaultBranchName}, nil