[#1969] local_object_storage: Add a type for logical errors
All logic errors are wrapped in `logicerr.Logical` type and do not affect shard error counter. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
98034005f1
commit
fcdbf5e509
42 changed files with 206 additions and 139 deletions
|
@ -1,10 +1,14 @@
|
|||
package common
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util/logicerr"
|
||||
)
|
||||
|
||||
// ErrReadOnly MUST be returned for modifying operations when the storage was opened
|
||||
// in readonly mode.
|
||||
var ErrReadOnly = errors.New("opened as read-only")
|
||||
var ErrReadOnly = logicerr.Wrap(errors.New("opened as read-only"))
|
||||
|
||||
// ErrNoSpace MUST be returned when there is no space to put an object on the device.
|
||||
var ErrNoSpace = errors.New("no free space")
|
||||
var ErrNoSpace = logicerr.Wrap(errors.New("no free space"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue