[#585] fstree: Return logical error if object deleted

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
pull/595/head
Dmitrii Stepanov 2023-08-10 18:46:24 +03:00
parent 0c52186572
commit baad49990c
1 changed files with 3 additions and 0 deletions

View File

@ -429,6 +429,9 @@ func (t *FSTree) Get(ctx context.Context, prm common.GetPrm) (common.GetRes, err
data, err = os.ReadFile(p)
if err != nil {
if os.IsNotExist(err) {
return common.GetRes{}, logicerr.Wrap(new(apistatus.ObjectNotFound))
}
return common.GetRes{}, err
}
}