[#521] *: use stdlib errors package

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-05-18 11:12:51 +03:00 committed by Alex Vanin
parent 43e575cec2
commit 71b87155ef
171 changed files with 825 additions and 674 deletions

View file

@ -1,8 +1,9 @@
package blobstor
import (
"fmt"
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
"github.com/pkg/errors"
)
// PutPrm groups the parameters of Put operation.
@ -27,7 +28,7 @@ func (b *BlobStor) Put(prm *PutPrm) (*PutRes, error) {
// marshal object
data, err := prm.obj.Marshal()
if err != nil {
return nil, errors.Wrap(err, "could not marshal the object")
return nil, fmt.Errorf("could not marshal the object: %w", err)
}
return b.PutRaw(prm.obj.Address(), data)