Skip to content

Commit

Permalink
Merge pull request #516 from onflow/fix-duplicate-logs
Browse files Browse the repository at this point in the history
Fix display of duplicate logs
  • Loading branch information
sideninja authored Sep 4, 2024
2 parents 86d9193 + 96dbc27 commit 3610b40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ func (w *responseHandler) Write(data []byte) (int, error) {
!errorIs(errMsg, errs.ErrFailedTransaction) &&
!errorIs(errMsg, errs.ErrEndpointNotSupported) &&
!errorIs(errMsg, gethVM.ErrExecutionReverted) {
// log the error
l.Error().Err(errors.New(errMsg)).Msg("API response")
// log the response error as a warning
l.Warn().Err(errors.New(errMsg)).Msg("API response")
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion services/requester/remote_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ func (l *remoteLedger) GetValue(owner, key []byte) ([]byte, error) {
RegisterIds: []*entities.RegisterID{registerID},
},
)
if err != nil && status.Code(err) != codes.NotFound {
errorCode := status.Code(err)
if err != nil && errorCode != codes.NotFound && errorCode != codes.OutOfRange {
return nil, err
}

Expand Down

0 comments on commit 3610b40

Please sign in to comment.