diff --git a/internal/cli/logout.go b/internal/cli/logout.go index 91689f0ce..b6b2a3d7c 100644 --- a/internal/cli/logout.go +++ b/internal/cli/logout.go @@ -36,7 +36,7 @@ func logoutCmd(cli *cli) *cobra.Command { input := prompt.SelectInput("tenant", "Tenant:", "Tenant to logout", tenNames, tenNames[0], true) if err := prompt.AskOne(input, &selectedTenant); err != nil { - return fmt.Errorf("An unexpected error occurred: %w", err) + return handleInputError(err) } } else { requestedTenant := args[0] diff --git a/internal/cli/tenants.go b/internal/cli/tenants.go index a1dc3c623..8105b0ee8 100644 --- a/internal/cli/tenants.go +++ b/internal/cli/tenants.go @@ -71,7 +71,7 @@ func useTenantCmd(cli *cli) *cobra.Command { input := prompt.SelectInput("tenant", "Tenant:", "Tenant to activate", tenNames, tenNames[0], true) if err := prompt.AskOne(input, &selectedTenant); err != nil { - return fmt.Errorf("An unexpected error occurred: %w", err) + return handleInputError(err) } } else { requestedTenant := args[0]