Skip to content

Commit 4d504d9

Browse files
committed
fix #1: fix segfault on group or user request failure
1 parent f3f6c26 commit 4d504d9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

fs/projects.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ func (n *projectsNode) OnAdd(ctx context.Context) {
3030
groupNode, err := newGroupNodeByID(groupID, n.param)
3131
if err != nil {
3232
fmt.Printf("root group fetch fail: %v\n", err)
33+
fmt.Printf("Please verify the group exists, is public or a token with sufficient permissions is set in the config files.\n")
34+
fmt.Printf("Skipping group %v\n", groupID)
35+
return
3336
}
3437
inode := n.NewPersistentInode(
3538
ctx,

fs/users.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ func (n *usersNode) OnAdd(ctx context.Context) {
5555
userNode, err := newUserNodeByID(userID, n.param)
5656
if err != nil {
5757
fmt.Printf("user fetch fail: %v\n", err)
58+
fmt.Printf("Please verify the user exists and token with sufficient permissions is set in the config files.\n")
59+
fmt.Printf("Skipping user %v\n", userID)
60+
return
5861
}
5962
inode := n.NewPersistentInode(
6063
ctx,

0 commit comments

Comments
 (0)