From 7335a52f2949f765c545fcf5b0104b3357aafed3 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 4 Nov 2022 10:51:55 +0300 Subject: [PATCH] [#1732] pilorama: Improve logical error handling Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/pilorama/types.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/local_object_storage/pilorama/types.go b/pkg/local_object_storage/pilorama/types.go index 013b7b5ff..9d163256b 100644 --- a/pkg/local_object_storage/pilorama/types.go +++ b/pkg/local_object_storage/pilorama/types.go @@ -1,8 +1,9 @@ package pilorama import ( - "errors" "math" + + "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util/logicerr" ) // Timestamp is an alias for integer timestamp type. @@ -50,10 +51,10 @@ const ( var ( // ErrTreeNotFound is returned when the requested tree is not found. - ErrTreeNotFound = errors.New("tree not found") + ErrTreeNotFound = logicerr.New("tree not found") // ErrNotPathAttribute is returned when the path is trying to be constructed with a non-internal // attribute. Currently the only attribute allowed is AttributeFilename. - ErrNotPathAttribute = errors.New("attribute can't be used in path construction") + ErrNotPathAttribute = logicerr.New("attribute can't be used in path construction") ) // isAttributeInternal returns true iff key can be used in `*ByPath` methods.