Skip to content

Commit

Permalink
fix: handle correct error
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed Oct 4, 2023
1 parent 6e42ead commit 0bee3c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eth/handler_bor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0bee3c2

Please sign in to comment.