From cbc816d57dfb1d4ffa787a0ab56482291ea907a0 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 3 Mar 2022 18:01:44 +0300 Subject: [PATCH] [#1211] node: Fix object get init error check Signed-off-by: Alex Vanin --- pkg/services/object/internal/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/object/internal/client/client.go b/pkg/services/object/internal/client/client.go index 20bc28a674..83ec0a4a27 100644 --- a/pkg/services/object/internal/client/client.go +++ b/pkg/services/object/internal/client/client.go @@ -166,7 +166,7 @@ func GetObject(prm GetObjectPrm) (*GetObjectRes, error) { prm.cliPrm.WithXHeaders(prm.xHeadersPrm()...) rdr, err := prm.cli.ObjectGetInit(prm.ctx, prm.cliPrm) - if err == nil { + if err != nil { return nil, fmt.Errorf("init object reading: %w", err) }