From f63cf7d4984357570f981e0e46b8d44e8d494499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=B6ckli?= Date: Thu, 4 Jan 2024 13:51:23 +0100 Subject: [PATCH] BAARC-96: Use err channel instead of logging --- metamorph/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metamorph/server.go b/metamorph/server.go index 3c78368f3..8a7b7059e 100644 --- a/metamorph/server.go +++ b/metamorph/server.go @@ -524,11 +524,11 @@ func (s *Server) getMerklePath(ctx context.Context, hash *chainhash.Hash, dataSt if err != nil { if errors.Is(err, blocktx.ErrTransactionNotFoundForMerklePath) { if dataStatus == metamorph_api.Status_MINED { - s.logger.Error("Merkle path not found for mined transaction", slog.String("hash", hash.String()), slog.String("err", err.Error())) + errCh <- fmt.Errorf("merkle path not found for mined transaction %s: %v", hash.String(), err) return } } else { - s.logger.Error("failed to get Merkle path for transaction", slog.String("hash", hash.String()), slog.String("err", err.Error())) + errCh <- fmt.Errorf("failed to get Merkle path for transaction %s: %v", hash.String(), err) return } }