[#2024] services/object: Unify status errors

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-11-08 15:12:52 +03:00 committed by fyrchik
parent 3875fef542
commit aa478f1def
4 changed files with 6 additions and 5 deletions

View file

@ -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