fix #1: fix segfault on group or user request failure

This commit is contained in:
Massaki Archambault 2021-01-17 23:34:58 -05:00
parent f3f6c26557
commit 4d504d9f5a
2 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,9 @@ func (n *projectsNode) OnAdd(ctx context.Context) {
groupNode, err := newGroupNodeByID(groupID, n.param)
if err != nil {
fmt.Printf("root group fetch fail: %v\n", err)
fmt.Printf("Please verify the group exists, is public or a token with sufficient permissions is set in the config files.\n")
fmt.Printf("Skipping group %v\n", groupID)
return
}
inode := n.NewPersistentInode(
ctx,

View File

@ -55,6 +55,9 @@ func (n *usersNode) OnAdd(ctx context.Context) {
userNode, err := newUserNodeByID(userID, n.param)
if err != nil {
fmt.Printf("user fetch fail: %v\n", err)
fmt.Printf("Please verify the user exists and token with sufficient permissions is set in the config files.\n")
fmt.Printf("Skipping user %v\n", userID)
return
}
inode := n.NewPersistentInode(
ctx,