From 0bee3c2a90b4e691d9f51e142f092e34a658a3df Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Thu, 5 Oct 2023 01:38:29 +0530 Subject: [PATCH] fix: handle correct error --- eth/handler_bor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/handler_bor.go b/eth/handler_bor.go index f1f2544396..9fbc096d3d 100644 --- a/eth/handler_bor.go +++ b/eth/handler_bor.go @@ -66,7 +66,7 @@ func (h *ethHandler) fetchWhitelistMilestone(ctx context.Context, bor *bor.Bor, milestone, err := bor.HeimdallClient.FetchMilestone(ctx) if errors.Is(err, heimdall.ErrServiceUnavailable) { log.Debug("Failed to fetch latest milestone for whitelisting", "err", err) - return num, hash, errMilestone + return num, hash, err } if err != nil { @@ -100,7 +100,7 @@ func (h *ethHandler) fetchNoAckMilestone(ctx context.Context, bor *bor.Bor) (str milestoneID, err := bor.HeimdallClient.FetchLastNoAckMilestone(ctx) if errors.Is(err, heimdall.ErrServiceUnavailable) { log.Debug("Failed to fetch latest no-ack milestone", "err", err) - return milestoneID, errMilestone + return milestoneID, err } if err != nil {