diff --git a/pkg/services/object/ape/service.go b/pkg/services/object/ape/service.go index cc18a0bc..8f45a8ff 100644 --- a/pkg/services/object/ape/service.go +++ b/pkg/services/object/ape/service.go @@ -214,7 +214,7 @@ func (c *Service) Head(ctx context.Context, request *objectV2.HeadRequest) (*obj SoftAPECheck: reqCtx.SoftAPECheck, }) if err != nil { - return nil, err + return nil, toStatusErr(err) } resp, err := c.next.Head(ctx, request) @@ -252,7 +252,7 @@ func (c *Service) Head(ctx context.Context, request *objectV2.HeadRequest) (*obj SoftAPECheck: reqCtx.SoftAPECheck, }) if err != nil { - return nil, err + return nil, toStatusErr(err) } return resp, nil } @@ -306,7 +306,7 @@ func (c *Service) Delete(ctx context.Context, request *objectV2.DeleteRequest) ( SoftAPECheck: reqCtx.SoftAPECheck, }) if err != nil { - return nil, err + return nil, toStatusErr(err) } resp, err := c.next.Delete(ctx, request) @@ -366,7 +366,7 @@ func (c *Service) GetRangeHash(ctx context.Context, request *objectV2.GetRangeHa } if err = c.apeChecker.CheckAPE(ctx, prm); err != nil { - return nil, err + return nil, toStatusErr(err) } resp, err := c.next.GetRangeHash(ctx, request) @@ -375,7 +375,7 @@ func (c *Service) GetRangeHash(ctx context.Context, request *objectV2.GetRangeHa } if err = c.apeChecker.CheckAPE(ctx, prm); err != nil { - return nil, err + return nil, toStatusErr(err) } return resp, nil }