2022-03-17 08:03:58 +00:00
|
|
|
package meta
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
|
2022-10-31 07:08:30 +00:00
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util/logicerr"
|
2022-03-17 08:03:58 +00:00
|
|
|
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
|
|
|
|
)
|
|
|
|
|
2022-10-31 07:08:30 +00:00
|
|
|
// ErrObjectIsExpired is returned when the requested object's
|
|
|
|
// epoch is less than the current one. Such objects are considered
|
|
|
|
// as removed and should not be returned from the Storage Engine.
|
|
|
|
var ErrObjectIsExpired = logicerr.New("object is expired")
|
|
|
|
|
2022-03-17 08:03:58 +00:00
|
|
|
// IsErrRemoved checks if error returned by Shard Exists/Get/Put method
|
|
|
|
// corresponds to removed object.
|
|
|
|
func IsErrRemoved(err error) bool {
|
|
|
|
return errors.As(err, new(apistatus.ObjectAlreadyRemoved))
|
|
|
|
}
|