Return error for non-existing runner group. (#2215)

This commit is contained in:
Tingluo Huang
2023-01-26 12:19:52 -05:00
committed by GitHub
parent 7ea60e497c
commit b09e3a2dc9
2 changed files with 45 additions and 1 deletions
+1 -1
View File
@@ -300,7 +300,7 @@ func (c *Client) GetRunnerGroupByName(ctx context.Context, runnerGroup string) (
}
if runnerGroupList.Count == 0 {
return nil, nil
return nil, fmt.Errorf("no runner group found with name '%s'", runnerGroup)
}
if runnerGroupList.Count > 1 {