diff --git a/cmd/neofs-adm/internal/modules/morph/n3client.go b/cmd/neofs-adm/internal/modules/morph/n3client.go index f3e4c154..578772d0 100644 --- a/cmd/neofs-adm/internal/modules/morph/n3client.go +++ b/cmd/neofs-adm/internal/modules/morph/n3client.go @@ -2,6 +2,7 @@ package morph import ( "context" + "errors" "github.com/nspcc-dev/neo-go/pkg/rpc/client" "github.com/spf13/viper" @@ -10,6 +11,9 @@ import ( func getN3Client(v *viper.Viper) (*client.Client, error) { ctx := context.Background() // FIXME(@fyrchik): timeout context endpoint := v.GetString(endpointFlag) + if endpoint == "" { + return nil, errors.New("missing endpoint") + } c, err := client.New(ctx, endpoint, client.Options{}) if err != nil { return nil, err