From 5254fd943b9ace67db68e01ec8f431b806775c8e Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Tue, 7 Jul 2020 14:31:55 +0300 Subject: [PATCH] Wrap gRPC errors --- neofs/layer/gateway-neofs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofs/layer/gateway-neofs.go b/neofs/layer/gateway-neofs.go index fc23207c..ee585340 100644 --- a/neofs/layer/gateway-neofs.go +++ b/neofs/layer/gateway-neofs.go @@ -3,7 +3,6 @@ package layer import ( "context" "crypto/ecdsa" - "errors" "math" "time" @@ -14,6 +13,7 @@ import ( "github.com/nspcc-dev/neofs-api-go/refs" "github.com/nspcc-dev/neofs-api-go/service" crypto "github.com/nspcc-dev/neofs-crypto" + "github.com/pkg/errors" ) type ( @@ -67,7 +67,7 @@ func NewLayer(cli pool.Client, cred auth.Credentials) (minio.ObjectLayer, error) until: math.MaxInt64, }) if err != nil { - return nil, errors.New("can't establish neofs session with remote host") + return nil, errors.Wrap(err, "can't establish neofs session with remote host") } return &neofsObject{