Skip to content

Commit

Permalink
[hotfix] validate env before getting gateway client (#2973)
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaosky authored Dec 16, 2024
1 parent abe2c13 commit eba43e8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/flink/command_connection_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ func (c *command) newConnectionListCommand() *cobra.Command {
}

func (c *command) connectionList(cmd *cobra.Command, _ []string) error {
client, err := c.GetFlinkGatewayClient(false)
if err != nil {
return err
}

environmentId, err := c.Context.EnvironmentId()
if err != nil {
return err
Expand All @@ -59,6 +54,11 @@ func (c *command) connectionList(cmd *cobra.Command, _ []string) error {
}
}

client, err := c.GetFlinkGatewayClient(false)
if err != nil {
return err
}

connections, err := client.ListConnections(environmentId, c.Context.GetCurrentOrganization(), strings.ToUpper(connectionType))
if err != nil {
return err
Expand Down

0 comments on commit eba43e8

Please sign in to comment.