[#1186] blobstor: Unify errors for Get and GetRangeBig

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
(cherry picked from commit b33fb0f739)
This commit is contained in:
Evgenii Stratonikov 2022-03-04 15:56:29 +03:00 committed by Alex Vanin
parent b5bcf90fa1
commit baad9d06a1

View file

@ -27,6 +27,10 @@ func (b *BlobStor) GetRangeBig(prm *GetRangeBigPrm) (*GetRangeBigRes, error) {
// get compressed object data // get compressed object data
data, err := b.fsTree.Get(prm.addr) data, err := b.fsTree.Get(prm.addr)
if err != nil { if err != nil {
if errors.Is(err, fstree.ErrFileNotFound) {
return nil, object.ErrNotFound
}
return nil, fmt.Errorf("could not read object from fs tree: %w", err) return nil, fmt.Errorf("could not read object from fs tree: %w", err)
} }