diff --git a/pkg/services/object/head/distributed.go b/pkg/services/object/head/distributed.go index 9fe4e0c7aa..6ca3b5905f 100644 --- a/pkg/services/object/head/distributed.go +++ b/pkg/services/object/head/distributed.go @@ -135,7 +135,7 @@ loop: } if !h.traverser.Success() { - return nil, errors.Errorf("(%T) incomplete object Head operation", h) + return nil, errors.Wrapf(ErrNotFound, "(%T) incomplete object Head operation", h) } return resp, nil diff --git a/pkg/services/object/head/service.go b/pkg/services/object/head/service.go index 18ac0c0f90..535b25dcbf 100644 --- a/pkg/services/object/head/service.go +++ b/pkg/services/object/head/service.go @@ -39,6 +39,8 @@ type cfg struct { rightChildSearcher RelationSearcher } +var ErrNotFound = errors.New("object header not found") + func defaultCfg() *cfg { return &cfg{ workerPool: new(util.SyncWorkerPool),