@@ -68,7 +68,7 @@ func ParseWebHookJSON(secret string, lambdaRequest events.LambdaFunctionURLReque
68
68
69
69
currentUser , _ , err := gitLabClients [projectId ].Users .CurrentUser ()
70
70
if err != nil {
71
- return fmt .Errorf ("failed to get current GitLab user info, %v" , err )
71
+ return fmt .Errorf ("failed to get current GitLab user info, projectId: %v, %v" , projectId , err )
72
72
}
73
73
fmt .Printf ("Current GitLab user id: %d\n " , currentUser .ID )
74
74
@@ -142,7 +142,7 @@ func ParseWebHookJSON(secret string, lambdaRequest events.LambdaFunctionURLReque
142
142
143
143
currentUser , _ , err := gitLabClients [projectId ].Users .CurrentUser ()
144
144
if err != nil {
145
- return fmt .Errorf ("failed to get current GitLab user info, %v" , err )
145
+ return fmt .Errorf ("failed to get current GitLab user info, projectId: %v, %v" , projectId , err )
146
146
}
147
147
fmt .Printf ("Current GitLab user id: %d\n " , currentUser .ID )
148
148
@@ -259,7 +259,8 @@ func CreateGitLabClient() (map[int]*gitlab.Client, error) {
259
259
var tokens []map [string ]string
260
260
err := json .Unmarshal ([]byte (gitlabTokenJson ), & tokens )
261
261
if err != nil {
262
- panic (err )
262
+ fmt .Printf ("failed to unmarshal gitlabTokenJson, %v" , err )
263
+ return nil , err
263
264
}
264
265
result = make (map [int ]* gitlab.Client , len (tokens ))
265
266
0 commit comments