From b7acb34fa4377a690f5f7fbe18c580c2d785b772 Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Mon, 19 Aug 2024 15:50:35 +0300 Subject: [PATCH] [#1319] treeSvc: Do not wrap error from APE Signed-off-by: Dmitrii Stepanov --- pkg/services/tree/ape.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/services/tree/ape.go b/pkg/services/tree/ape.go index 6e78bf4ec..ee4687911 100644 --- a/pkg/services/tree/ape.go +++ b/pkg/services/tree/ape.go @@ -138,7 +138,7 @@ func (s *Service) checkAPE(ctx context.Context, bt *bearer.Token, request, err := s.newAPERequest(ctx, namespace, cid, operation, role, publicKey) if err != nil { - return apeErr(err) + return fmt.Errorf("failed to create ape request: %w", err) } var cr engine.ChainRouter @@ -167,7 +167,7 @@ func (s *Service) checkAPE(ctx context.Context, bt *bearer.Token, rt := engine.NewRequestTargetExtended(namespace, cid.EncodeToString(), fmt.Sprintf("%s:%s", namespace, publicKey.Address()), groups) status, found, err := cr.IsAllowed(apechain.Ingress, rt, request) if err != nil { - return apeErr(err) + return err } if found && status == apechain.Allow { return nil