diff --git a/pkg/services/object/head/distributed.go b/pkg/services/object/head/distributed.go index 9fe4e0c7a..6ca3b5905 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 18ac0c0f9..535b25dcb 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),