[#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,10 +1,11 @@
package container
import (
"fmt"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
"github.com/pkg/errors"
)
// Delete structure of container.Delete notification from morph chain.
@ -36,13 +37,13 @@ func ParseDelete(params []stackitem.Item) (event.Event, error) {
// parse container
ev.containerID, err = client.BytesFromStackItem(params[0])
if err != nil {
return nil, errors.Wrap(err, "could not get container")
return nil, fmt.Errorf("could not get container: %w", err)
}
// parse signature
ev.signature, err = client.BytesFromStackItem(params[1])
if err != nil {
return nil, errors.Wrap(err, "could not get signature")
return nil, fmt.Errorf("could not get signature: %w", err)
}
return ev, nil