From fbe03e96cb0a47dd8d5e1a82ed07e38127c1e7be Mon Sep 17 00:00:00 2001 From: royroyee Date: Fri, 5 Apr 2024 13:38:43 +0900 Subject: [PATCH] Minor fix --- cmd/iam/group_detail.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/iam/group_detail.go b/cmd/iam/group_detail.go index 77b2290..0c5ce9f 100644 --- a/cmd/iam/group_detail.go +++ b/cmd/iam/group_detail.go @@ -28,7 +28,11 @@ var groupDetailCmd = &cobra.Command{ utils.CliError("Connection to Alpacon API failed: %s. Consider re-logging.", err) } - groupDetail, err := iam.GetGroupDetail(alpaconClient, groupName) + groupId, err := iam.GetGroupIDByName(alpaconClient, groupName) + if err != nil { + utils.CliError("Failed to retrieve the group details: %s. Please check if the groupname is correct and try again.", err) + } + groupDetail, err := iam.GetGroupDetail(alpaconClient, groupId) if err != nil { utils.CliError("Failed to retrieve the group details: %s.", err) }