Skip to content

Commit

Permalink
Merge pull request #449 from forta-protocol/ignore-trace-api-not-foun…
Browse files Browse the repository at this point in the history
…d-error

Ignore trace_block 'not found' error
  • Loading branch information
canercidam authored Feb 28, 2022
2 parents a1a94f7 + 40d5130 commit 19a88d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/scanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"strconv"
"strings"
"time"

"github.com/ethereum/go-ethereum/accounts/keystore"
Expand Down Expand Up @@ -237,7 +238,8 @@ func summarizeReports(reports health.Reports) *health.Report {
}

traceBlockErr, ok := reports.NameContains("trace-json-rpc-client.request.trace-block.error")
if ok && len(traceBlockErr.Details) > 0 {
isTraceBlockNotFoundErr := strings.Contains(traceBlockErr.Details, "not found")
if ok && len(traceBlockErr.Details) > 0 && !isTraceBlockNotFoundErr {
summary.Addf("trace api (trace_block) is failing with error '%s'.", traceBlockErr.Details)
summary.Status(health.StatusFailing)
}
Expand Down

0 comments on commit 19a88d1

Please sign in to comment.