From baad9d06a16ad9c5f1d103326d4d2287fdb5e277 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 4 Mar 2022 15:56:29 +0300 Subject: [PATCH] [#1186] blobstor: Unify errors for `Get` and `GetRangeBig` Signed-off-by: Evgenii Stratonikov (cherry picked from commit b33fb0f7396c060eeab56e1fdbe4a988132ee6cf) --- pkg/local_object_storage/blobstor/get_range_big.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/local_object_storage/blobstor/get_range_big.go b/pkg/local_object_storage/blobstor/get_range_big.go index e2eeb7359..00fdc2253 100644 --- a/pkg/local_object_storage/blobstor/get_range_big.go +++ b/pkg/local_object_storage/blobstor/get_range_big.go @@ -27,6 +27,10 @@ func (b *BlobStor) GetRangeBig(prm *GetRangeBigPrm) (*GetRangeBigRes, error) { // get compressed object data data, err := b.fsTree.Get(prm.addr) 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) }