[#521] *: use stdlib errors
package
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
43e575cec2
commit
71b87155ef
171 changed files with 825 additions and 674 deletions
|
@ -2,9 +2,9 @@ package response
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// HandleUnaryRequest call passes request to handler, sets response meta header values and returns it.
|
||||
|
@ -12,7 +12,7 @@ func (s *Service) HandleUnaryRequest(ctx context.Context, req interface{}, handl
|
|||
// process request
|
||||
resp, err := handler(ctx, req)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not handle request")
|
||||
return nil, fmt.Errorf("could not handle request: %w", err)
|
||||
}
|
||||
|
||||
setMeta(resp, s.cfg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue