Skip to content

Commit 2d183e1

Browse files
committed
return empty result over custom empty error
1 parent b460280 commit 2d183e1

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

pkg/github/context_tools.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,6 @@ func GetTeams(getClient GetClientFn, getGQLClient GetGQLClientFn, t translations
157157
return mcp.NewToolResultError(err.Error()), nil
158158
}
159159

160-
t := q.User.Organizations.Nodes
161-
if len(t) == 0 {
162-
return mcp.NewToolResultError("no teams found for user"), nil
163-
}
164-
// Check if any teams exist within the organizations
165-
teamCount := 0
166-
for _, org := range t {
167-
teamCount += len(org.Teams.Nodes)
168-
}
169-
if teamCount == 0 {
170-
return mcp.NewToolResultError("no teams found for user"), nil
171-
}
172-
173160
return MarshalledTextResult(t), nil
174161
})
175162

0 commit comments

Comments
 (0)