[#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
|
@ -1,9 +1,10 @@
|
|||
package blobovnicza
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/object"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// GetRangePrm groups the parameters of GetRange operation.
|
||||
|
@ -59,7 +60,7 @@ func (b *Blobovnicza) GetRange(prm *GetRangePrm) (*GetRangeRes, error) {
|
|||
payload := res.obj
|
||||
|
||||
if from > to {
|
||||
return nil, errors.Errorf("invalid range [%d:%d]", from, to)
|
||||
return nil, fmt.Errorf("invalid range [%d:%d]", from, to)
|
||||
} else if uint64(len(payload)) < to {
|
||||
return nil, object.ErrRangeOutOfBounds
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue