Skip to content
Snippets Groups Projects
Commit dde19b61 authored by Michał Bień's avatar Michał Bień
Browse files

Improved logging

parent cf1c76c5
No related branches found
No related tags found
No related merge requests found
syntax = "proto3";
package v1;
option java_package = "net.geant.nmaas.externalservices.inventory.janitor";
option java_outer_classname = "JanitorManager";
enum Status {
FAILED = 0;
OK = 1;
......
......@@ -3,10 +3,12 @@ package v1
import (
"context"
"github.com/xanzy/go-gitlab"
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
kube "k8s.io/client-go/kubernetes/typed/core/v1"
apiv1 "k8s.io/api/core/v1"
"log"
"strconv"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
......@@ -51,7 +53,9 @@ func (s *configServiceServer) FindGitlabProjectId(api *gitlab.Client, uid string
//Find exact group
groups, _, err := s.gitAPI.Groups.SearchGroup(domain)
if len(groups) != 1 || err != nil {
return -1, status.Errorf(codes.NotFound, "Gitlab Group for given namespace does not exist")
log.Fatal("Found " + strconv.Itoa(len(groups)) + "groups")
log.Fatal(err)
return -1, status.Errorf(codes.NotFound, "Gitlab Group for given domain does not exist")
}
//List group projects
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment