forked from TrueCloudLab/frostfs-node
[#1561] object: Return OUT_OF_RANGE
status
Replace `ErrRangeOutOfBounds` error from `pkg/core/object` package with `ObjectOutOfRange` from `apistatus` package. That error is returned by storage node's server as NeoFS API statuses. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
ccba07fe19
commit
9f7a22e2aa
11 changed files with 46 additions and 27 deletions
11
pkg/local_object_storage/blobstor/errors.go
Normal file
11
pkg/local_object_storage/blobstor/errors.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package blobstor
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
|
||||
)
|
||||
|
||||
func isErrOutOfRange(err error) bool {
|
||||
return errors.As(err, new(apistatus.ObjectOutOfRange))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue