forked from TrueCloudLab/frostfs-node
[#2024] services/object: Unify status errors
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
3875fef542
commit
aa478f1def
4 changed files with 6 additions and 5 deletions
|
@ -96,7 +96,7 @@ func (exec *execCtx) initFromChild(obj oid.ID) (prev *oid.ID, children []oid.ID)
|
|||
if seekTo < seekOff || parSize < seekOff || parSize < seekTo {
|
||||
var errOutOfRange apistatus.ObjectOutOfRange
|
||||
|
||||
exec.err = errOutOfRange
|
||||
exec.err = &errOutOfRange
|
||||
exec.status = statusOutOfRange
|
||||
|
||||
return
|
||||
|
|
|
@ -156,7 +156,7 @@ func (c *clientWrapper) getObject(exec *execCtx, info coreclient.NodeInfo) (*obj
|
|||
to := from + rng.GetLength()
|
||||
|
||||
if pLen := uint64(len(payload)); to < from || pLen < from || pLen < to {
|
||||
return nil, apistatus.ObjectOutOfRange{}
|
||||
return nil, new(apistatus.ObjectOutOfRange)
|
||||
}
|
||||
|
||||
return payloadOnlyObject(payload[from:to]), nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue