[#1211] node: Fix object get init error check

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-03-03 18:01:44 +03:00 committed by Alex Vanin
parent bc45a79d1f
commit cbc816d57d

View file

@ -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)
}