File tree Expand file tree Collapse file tree
internal/cmd/beta/sfs/project-lock Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,11 +2,7 @@ package describe
22
33import (
44 "context"
5- sysErrors "errors"
65 "fmt"
7- "net/http"
8-
9- "github.com/stackitcloud/stackit-sdk-go/core/oapierror"
106
117 "github.com/stackitcloud/stackit-cli/internal/pkg/args"
128 "github.com/stackitcloud/stackit-cli/internal/pkg/errors"
@@ -63,14 +59,6 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
6359 req := buildRequest (ctx , model , apiClient )
6460 resp , err := req .Execute ()
6561 if err != nil {
66- var oApiErr * oapierror.GenericOpenAPIError
67- if sysErrors .As (err , & oApiErr ) {
68- if oApiErr .StatusCode == http .StatusNotFound {
69- params .Printer .Outputf ("No active lock found for project %s\n " , projectLabel )
70- return err
71- }
72- }
73-
7462 return fmt .Errorf ("get lock status for project: %w" , err )
7563 }
7664
Original file line number Diff line number Diff line change @@ -2,12 +2,9 @@ package lock
22
33import (
44 "context"
5- sysErrors "errors"
65 "fmt"
7- "net/http"
86
97 "github.com/spf13/cobra"
10- "github.com/stackitcloud/stackit-sdk-go/core/oapierror"
118 sfs "github.com/stackitcloud/stackit-sdk-go/services/sfs/v1api"
129
1310 "github.com/stackitcloud/stackit-cli/internal/pkg/args"
@@ -67,14 +64,6 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
6764 req := buildRequest (ctx , model , apiClient )
6865 resp , err := req .Execute ()
6966 if err != nil {
70- var oApiErr * oapierror.GenericOpenAPIError
71- if sysErrors .As (err , & oApiErr ) {
72- if oApiErr .StatusCode == http .StatusConflict {
73- params .Printer .Info ("There is already an active lock for project %s\n " , projectLabel )
74- return err
75- }
76- }
77-
7867 return fmt .Errorf ("enable SFS project lock: %w" , err )
7968 }
8069
You can’t perform that action at this time.
0 commit comments