From 61a3afbf9b1039b6663b2ecf88786491d7ed0d3f Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 24 Jan 2024 11:04:37 +0300 Subject: [PATCH] [#768] adm: Rephrase error text for NNS fetch Error could come from the network, we must not assume everything. Signed-off-by: Evgenii Stratonikov --- cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go b/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go index dd304d8af..20e44a81a 100644 --- a/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go +++ b/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go @@ -541,7 +541,7 @@ func (c *initializeContext) getContractDeployData(ctrName string, keysParam []an r := management.NewReader(c.ReadOnlyInvoker) nnsCs, err := r.GetContractByID(1) if err != nil { - return nil, errors.New("NNS is not yet deployed") + return nil, fmt.Errorf("get nns contract: %w", err) } items = append(items, c.Contracts[netmapContract].Hash, @@ -605,7 +605,7 @@ func (c *initializeContext) getNetConfigFromNetmapContract() ([]stackitem.Item, r := management.NewReader(c.ReadOnlyInvoker) cs, err := r.GetContractByID(1) if err != nil { - return nil, fmt.Errorf("NNS is not yet deployed: %w", err) + return nil, fmt.Errorf("get nns contract: %w", err) } nmHash, err := nnsResolveHash(c.ReadOnlyInvoker, cs.Hash, domainOf(netmapContract)) if err != nil {