Skip to content

Commit

Permalink
PRT - adding warning prints when get result returns an error. (lavane…
Browse files Browse the repository at this point in the history
  • Loading branch information
ranlavanet authored Jun 15, 2023
1 parent 8b73d5d commit 38c56bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ func (cp JsonrpcMessage) GetParams() interface{} {
}

func (cp JsonrpcMessage) GetResult() json.RawMessage {
if cp.Error != nil {
utils.LavaFormatWarning("GetResult() Request got an error from the node", nil, utils.Attribute{Key: "error", Value: cp.Error})
}
return cp.Result
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ func (cp TendermintrpcMessage) GetParams() interface{} {
}

func (cp TendermintrpcMessage) GetResult() json.RawMessage {
if cp.Error != nil {
utils.LavaFormatWarning("GetResult() Request got an error from the node", nil, utils.Attribute{Key: "error", Value: cp.Error})
}
return cp.Result
}

Expand Down

0 comments on commit 38c56bd

Please sign in to comment.